in reply to Renaming files in a directory in sequence
I agree with the previous reply: your script should just print out a list of "oldname newname" pairs (one pair per line). Once you confirm that the names are coming out right, just include "mv" (or "rename", depending on your OS) at the start of each line, and you can use the list as a shell script to actually change the file names.
For that matter, it might be easier for you to create the list of original file names as a list that your script can read as input, instead of using 'glob' in the script. That way, if you still have trouble getting it to do what you want. you can post a few lines from the input list, along with the script that tries to work on that input, so we'll have a better idea of the problem.
|
|---|