There's more than one way to do things | |
PerlMonks |
Re: file compare and renamingby brx (Pilgrim) |
on Apr 20, 2012 at 06:53 UTC ( [id://966106]=note: print w/replies, xml ) | Need Help?? |
Take a look to rename and perlrun (-n -l -e) (update: and perlretut). An adhoc one-liner can do the job. Try this... ... then if everything seems OK (no files with the same "SxxEyy" for example) But don't feel to confident with this : it is a good idea to write a real script if you want to automate this task without human-control. Not my fault if you lose all your pictures/movies/files. Update: Add this check. Count file before renaming:
Number of file that should results:
This way you can't lose the files, only the filenames ;-)
In Section
Seekers of Perl Wisdom
|
|