in reply to file compare and renaming
... then if everything seems OK (no files with the same "SxxEyy" for example)ls | perl -nle '$a=$_;s/.*?(S\d\dE\d\d).*?\.(avi|srt)/LikeABoss${1}Yea +h.$2/;print "$a => $_"'
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.ls | perl -nle '$a=$_;s/.*?(S\d\dE\d\d).*?\.(avi|srt)/LikeABoss${1}Yea +h.$2/;rename $a,$_'
ls | wc -l
ls | perl -nle '$a=$_;s/.*?(S\d\dE\d\d).*?\.(avi|srt)/LikeABoss${1}Yea +h.$2/;$h{$_}++}{print scalar keys%h'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: file compare and renaming
by Anonymous Monk on Apr 20, 2012 at 07:07 UTC |