I am trying to convert my TIFF files into ASCII files. I have a code written out that is doing exactly what I need done BUT when it converts it to an ASC file, it puts ".tif" on the end of the original file name - which I can't have.
import os
dir_name = 'C:\\PRCPRaster'
for filename in os.listdir(dir_name):
if not filename.endswith(".tif"): continue
full_path = os.path.join(dir_name, filename)
outASCII = '%s.asc' % (full_path)
arcpy.conversion.RasterToASCII(full_path, outASCII)
I have tried to debug my current code but haven't had any such luck. I'm sure its a simple fix but I'm still pretty new to python and would love some assistance if anyone has an easy fix for me!