I have ~100 rasters I need to clip to an area. All rasters are saved as .bil files, and for use in later processing I was trying to make these have 'no extension for esri grid', but keep the same name. i.e. depth.bil becomes depth, hazard.bil becomes hazard etc. (There are multiple named files in each folder and in this model build example I am calling via %name% on iteration)
I tried to change this in 'calculate value' to take off the extension of the file:
expression = changeName("%Name%") code block = def changeName(name): return str(name[:-4])
This worked once, but when I changed folder it put it out of sync so it was naming files incorrectly to the raster it was clipping. If I don't remove this it says as a .bil file given it needs no extension in the clip tool. I can do some python but from what I know I would still be in the same predicament as this in ModelBuilder.