Hi Guys,
I've been trying this out and need to do it pro grammatically as I have a lot of rasters I am iterating through to convert to .asc. I tried specifying this in the raster to ASCII tool but then I end up with %filename%.asc.TXT I also tried the suggestion above of using calculate value. I get this error when I run it:
Executing: CreateEnvLayersFile C:\Users\OJB\Desktop\BurdsGIS\CollabPapers\Mimeticus\WorldClim\asc2 C:\Users\OJB\Desktop\BurdsGIS\CollabPapers\Mimeticus\WorldClim\tmin_clip NOT_RECURSIVE
Start Time: Thu Dec 06 14:12:56 2012
Executing (Iterate Rasters): IterateRasters C:\Users\OJB\Desktop\BurdsGIS\CollabPapers\Mimeticus\WorldClim\tmin_clip # # NOT_RECURSIVE
Start Time: Thu Dec 06 14:12:57 2012
Succeeded at Thu Dec 06 14:12:57 2012 (Elapsed Time: 0.00 seconds)
Executing (Raster to ASCII): RasterToASCII C:\Users\OJB\Desktop\BurdsGIS\CollabPapers\Mimeticus\WorldClim\tmin_clip\clip_tmin_1 C:\Users\OJB\Desktop\BurdsGIS\CollabPapers\Mimeticus\WorldClim\asc2\e_clip_tmin_1.TXT
Start Time: Thu Dec 06 14:12:57 2012
Succeeded at Thu Dec 06 14:12:59 2012 (Elapsed Time: 2.00 seconds)
Executing (Calculate Value): CalculateValue newext("C:\Users\OJB\Desktop\BurdsGIS\CollabPapers\Mimeticus\WorldClim\asc2\e_clip_tmin_1.txt","asc") "def newext(file,ext):\n import os\n newfile = os.path.splitext(file)[0] + "." + ext\n os.rename(file,newfile)" Variant
Start Time: Thu Dec 06 14:12:59 2012
ERROR 000539: Error running expression: newext("C:\Users\OJB\Desktop\BurdsGIS\CollabPapers\Mimeticus\WorldClim\asc2\e_clip_tmin_1.txt","asc") <type 'exceptions.WindowsError'>: [Error 123] The filename, directory name, or volume label syntax is incorrect
Failed to execute (Calculate Value).
Failed at Thu Dec 06 14:12:59 2012 (Elapsed Time: 0.00 seconds)
Failed to execute (CreateEnvLayersFile).
Failed at Thu Dec 06 14:12:59 2012 (Elapsed Time: 3.00 seconds)