Keep Output Name the same as Input Name for geoprocessing

4287
3
03-14-2011 04:14 PM
TravisBrousseau1
New Contributor
Hi I'm going to be converting 100s of Arc ASCII grids to ESRI Grid then to contours. Overall I want to keep the same name. Is this possible in batch geoprocessing? I've used the iteration command in batch geoprocessinig (using the '%i%') before but was wondering if there was another way to keep the name exactly the same. I have some python experience but have never tried to keep the name the same for so many files.

Overall the ascii file is called something like 'elevation_k1.asc' then I want convert it to ESRI grid and be called 'elevation_k1' and I want that name to be the same when I convert it to contours.

Anyone have any tips, tricks, or recommendations in keeping that file name the same name? Thanks.

Travis
0 Kudos
3 Replies
BBicking1
Esri Contributor
Hi I'm going to be converting 100s of Arc ASCII grids to ESRI Grid then to contours. Overall I want to keep the same name. Is this possible in batch geoprocessing? I've used the iteration command in batch geoprocessinig (using the '%i%') before but was wondering if there was another way to keep the name exactly the same. I have some python experience but have never tried to keep the name the same for so many files.

Overall the ascii file is called something like 'elevation_k1.asc' then I want convert it to ESRI grid and be called 'elevation_k1' and I want that name to be the same when I convert it to contours.

Anyone have any tips, tricks, or recommendations in keeping that file name the same name? Thanks.

Travis


Hi Travis,

which ArcGIS version are you working with?
If with ArcGIS 10, use the Iterate Files operator in ModelBuilder and then use %Name% in the ASCII to Raster tool to ensure the name stays the same.

Barbara Bicking
Geoprocessing Team
0 Kudos
JohnSobetzer
Frequent Contributor
You might note there is this which might help someday in the future: #NIM064840 (In batch processing on any tool the output names should be populated automatically using the input names).
0 Kudos
anTonialcaraz
Occasional Contributor II
Hi,
I'm using ArcGis10 to convert from Raster to Ascii (in model builder) and  I want to keep exactly the same output  name as the input.
I'm using the iterate tool but I'm not quite getting what I want.
any thoughts?

many thanks
0 Kudos