I am looking for a way to rename a batch of videos by remove text between two points. Specifically I would like to remove everything after the 6th character, to the last "LabelMe--".
0001--LabelMe--A005_01241110_C001--LabelMe-- --Interview--Man in library.mov
0002--LabelMe--A005_01241110_C002--LabelMe-- --Broll--Man looking at books.mov
0003--LabelMe--A005_01241111_C003--LabelMe-- --Broll--messed up--LabelMe-- --Broll--Sitting at table.mov
I am trying to do this using Apple's Automator Services. Right-click on a bunch of files and select the service to clean up the name. I found one piece of code but am not sure I am using it correctly.
for f in "$@"
do
echo sed -e 's/\(--LabelMe).*\(LabelMe--)/\1\2/'
done