Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
laziness, impatience, and hubris
 
PerlMonks  

Re: Rename multiple files following their directories' name

by hdb (Parson)
on Mar 19, 2013 at 11:32 UTC ( #1024272=note: print w/ replies, xml ) Need Help??


in reply to Rename multiple files following their directories' name

Are you looking for something like?

for $i (1..100) { system( "mv /folder$i/abc.txt /folder$i/folder$i.txt" ); }
I run under win7, so I have not tested it. If you want to search for files you need File::Find.
For every complex problem there is an answer that is clear, simple, and wrong. H. L. Mencken


Comment on Re: Rename multiple files following their directories' name
Download Code
Re^2: Rename multiple files following their directories' name
by moritz (Cardinal) on Mar 19, 2013 at 11:35 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2014-04-21 10:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (492 votes), past polls