Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Renaming Files with Regular Expressions

by svsingh (Priest)
on Dec 02, 2003 at 18:25 UTC ( #311703=CUFP: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    &renameFiles( &getArgs() );
    ...
          rename( $before, $after );
       }
    }
    
  2. or download this
    perl renrx "s|(.*?)(\d\d) ([^_]+) _ (.*?)(\.mp3)|$1$2 $4 _ $3$5|"
    
  3. or download this
    Maybe-01 Winter Wonderland _ Phantom Planet.mp3 => Maybe-01 Phantom Pl
    +anet _ Winter Wonderland.mp3
    Rename? [Yes|No|Always|Cancel] y
    Maybe-02 Maybe this Christmas _ Ron Sexsmith.mp3 => Maybe-02 Ron Sexsm
    +ith _ Maybe this Christmas.mp3
    Rename? [Yes|No|Always|Cancel] a
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://311703]
Approved by Paladin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-10-21 00:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (93 votes), past polls