Hey all, I've got a request for some help with a bash file, as I don't know where to start...
I have a bunch of files that end with ".SaaEbb.avi" (aa being two-digit number with a 0 at the beginning and bb being a two digit number). Example: Family.Guy.S05E13.avi, Prison.Break.S02E02.avi, Lost.S04E10.avi, etc
What i want to do is rename the files so that they end on ".axbb.avi" (so that the leading zero in a is removed and the format is different). Example: Family.Guy.5x13.avi, Prison.Break.2x02.avi, Lost.4x10.avi
All the season counters have a leading zero, so that may be helpful in making the simple script simpler!
I know I need to use "mv" to rename files, but I have no clue how to actually do some magic foo on the filenames to figure out what the new filename needs to be. Could someone please help me? Thanks!
Question
robz0rz
Hey all, I've got a request for some help with a bash file, as I don't know where to start...
I have a bunch of files that end with ".SaaEbb.avi" (aa being two-digit number with a 0 at the beginning and bb being a two digit number). Example: Family.Guy.S05E13.avi, Prison.Break.S02E02.avi, Lost.S04E10.avi, etc
What i want to do is rename the files so that they end on ".axbb.avi" (so that the leading zero in a is removed and the format is different). Example: Family.Guy.5x13.avi, Prison.Break.2x02.avi, Lost.4x10.avi
All the season counters have a leading zero, so that may be helpful in making the simple script simpler!
I know I need to use "mv" to rename files, but I have no clue how to actually do some magic foo on the filenames to figure out what the new filename needs to be. Could someone please help me? Thanks!
Link to comment
Share on other sites
2 answers to this question
Recommended Posts