in reply to What one-liners do people actually use?
I gotta download rename.pl so I can stop typing the following all the time:
dir /b | perl -ne "chomp; $o=$_; s/.../.../; $n=$_; rename($o,$n) unle +ss -e $n"
I added unless -e $n because I've renamed an entire directory to one file name once, leaving me only one file total. Thankfully, I had a copy of the files elsewhere.
|
---|
In Section
Seekers of Perl Wisdom