Hello,
I am trying to make a bash script that will sequentially rename files. The script itself doesn't need to worry about making sure it's rename it right, I just need it to rename files starting at the top of the files listed in ls and go down one at a time. What I'm trying to do is make a batch rename script that will rename the files sequentially. I know this can be done in automater easily with the "Get Specified Finder Items" and "Rename Finder Items" counters but I'd like to be able to do it in terminal.
My hiccup is getting it to run the for loop on only one item at a time.
I can make one that does *.mkv mv Episode ##.mkv but then it renames all the files in the folder to that because they all match *mkv.
I want to set it up once and be able to run it so that it can be compatible with any file name (shows and anime, etc.. come in crazy naming formats).
So how would I go about making the script test only the first in the list, then second, then third, etc... and not testing on the entire folder?
Thanks!!