Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: renaming files

by graff (Chancellor)
on Dec 16, 2011 at 03:49 UTC ( #943872=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ls *.mp3 | perl -lne '($n=$_)=~s/(..).*/$1_my_guitar.mp3/; rename $_, 
    +$n'
    
  2. or download this
    perl -e 'for (<*.mp3>){($n=$_)=~s/(..).*/$1_my_guitar.mp3/; rename $_,
    + $n}'
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://943872]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2016-12-04 19:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (69 votes). Check out past polls.