In ArcGIS ModelBuilder, I am trying to iterate over some ascii files (my_ascii.asc) in a folder (c:\my_folder) and converting them from ascii to raster. This works fine if I do it as shown below.
however I want to pass some parts of the input folder as a model parameter.
So let's say my input folders are c:\my_folder_2010 and c:\my_folder_2030, i want the year to be a model parameter. If I make the year variable and pass it into the iterator like c:\my_folder_%year% as shown below, it does something weird. Iterator finds the correct files, outputs the correct 'name' ('my_ascii'), but the output ascii remains 'file.asc' instead of 'my_ascii.asc'. Once it enters the 'ascii to raster', it says that it cannot find the 'file.asc', which is correct, because it is called 'my_ascii.asc'.
Why does iterator only works correct for the 'name' part, and not for the 'file.asc'? Any solutions?
I also tried parsing a path into the first data element that goes into the iterator, but that also did not work.