I am trying to use a for loop to rename multiple netcdf files based on the dates within their filenames ex:
my filenames are "SAMETEXTFORALL_2018MMDD_DifferentTextForAll.nc"
and I need to get them to be "nest_1_2018MMDD000000.nc"
I am trying to use a for loop such as the following for each month:
but the isfile is returning a 0 for each despite the file existing, and when I do the movefiles individually, they create new folders with the filename, but keep the original filename the same. I think the issue lies within the '*' wildcard, because when I put in the appropriate name for individual files it works. Any help/suggestions? There are too many files to do this on a more individual basis. Thanks!