rename files including ones in sub directories
Hi I trying to rename files across sub directories but not having much joy.
I want to rename files containing "-trailer.mov" in the name to ".[TRAILER].mov" for example "Filmname (2012)-trailer.mov" would become "Filmname (2012).[TRAILER].mov" I can do it in the directory containing the file with rename -v -- "-trailer.mov" ".[TRAILER].mov" *.* but how would I do it for all sub directories in/i-data/md0/Disk1/Films/ TIA |
Code:
#!/bin/bash |
Code:
find /i-data/md0/Disk1/Films/ -name \*-trailer.mov -exec rename "-trailer.mov" ".[TRAILER].mov" {} \+ |
Thanks guys the Bash one didn't seem to do anything but the other command after a slight tweak is working perfectly.
:hattip: |
Glad you got a solution :)
Threads can be marked SOLVED via the Thread Tools menu. |
All times are GMT -5. The time now is 10:06 AM. |