Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Renaming Multiple Files with Different Names

by Feral_Akodon (Initiate)
on Nov 02, 2011 at 16:18 UTC ( #935436=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Renaming Multiple Files with Different Names
in thread Renaming Multiple Files with Different Names

I do have a text file that matches the name of the current file (i.e. old file name) and the new file name. It's in tabular format.

I feel like it should be a rename code with $ARGV[0] as $old and $ARGV1 as $new. But when I do that it just tries to rename the text file containing the corresponding names.

Also I'm using Strawberry Perl on a PC, so sometimes it doesn't like command line prompts.


Comment on Re^3: Renaming Multiple Files with Different Names
Replies are listed 'Best First'.
Re^4: Renaming Multiple Files with Different Names
by choroba (Canon) on Nov 02, 2011 at 16:29 UTC
    Something like this?
    perl -nae 'rename $F[0], $F[1]' newnames.lst

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2015-07-29 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls