Oneline filename batch rename (specific sed instance pattern matching)
Hi,
I apologise for creating yet another batch rename thread, I know that there is a lot of information on it and I have attempted for a couple hours to find a solution using google and other threads. If I missed a suitable answer I apologise ahead of time. I would like to use only one liners from my bash command window. I have a bunch of files that were named with periods as separators. I used the following command to remove the periods and tweak a few other things. Code:
rename . _ *.avi Code:
get.smart.1965.s01e01.Mr.Big.dvdrip.xvid-fqm.avi Code:
Get_Smart_(1965)_01e01_Mr_Big.avi Code:
Get Smart (1965) 01e01 - Mr Big.avi Code:
ls *.avi | awk '{print("mv "$1" "$1)}' | sed 's/\_/\-/4'|/bin/sh Code:
syntax error near unexpected token `(' Code:
rename \_ \ *.avi Thanks in advance. |
Brute force
I managed to continue using these commands to do the batch rename:
Code:
rename \_ \-\ *.avi Code:
rename \_ \ *.avi Code:
get.smart.1965.01e02.Diplomats.Daughter.Diplomats.Daughter.Diplomats.Daughter.avi Code:
Get Smart (1965) 01e02 - Diplomats Daughter Diplomats Daughter Diplomats Daughter.avi Thanks. |
All times are GMT -5. The time now is 02:13 AM. |