jeudi 26 février 2015

Insert Character on batch folder rename


I have a folder that has several hundreds of thousands of files named like "ABC 123456". I need to add a dash after between the two blocks of text like this "ABC - 123456". Leaving the trailing space.


Automator does not offer a method for counting 4 characters in and inserting an new dash and space.


I have this terminal command and have been tinkering with it.



for file in *.txt
do
echo mv "$file" **"$file" count 3 "- "**
done


Anyone know of an Applescript or can help with the terminal command that will help me rename the files?





Aucun commentaire:

Enregistrer un commentaire