CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
Renaming Multiple Files in Subdirectories

 



pinto106
New User

Jul 18, 2011, 8:27 AM

Post #1 of 2 (6010 views)
Renaming Multiple Files in Subdirectories Can't Post

I have files in multiple directories that need to be renamed. There format is such:
Ac4025a14874.dat

However the only thing consistent is the .dat needs to be renamed to .arg
The filename is pretty much random. I am not specifically renaming Ac4025a14874.dat to Ac4025a14874.arg, but
XXXXXXXXXXXX.dat to XXXXXXXXXX.arg. Any suggestions? o


FishMonger
Veteran / Moderator

Jul 18, 2011, 10:48 AM

Post #2 of 2 (6003 views)
Re: [pinto106] Renaming Multiple Files in Subdirectories [In reply to] Can't Post

Use File::Find::Rule to locate the files and then rename as needed.

http://search.cpan.org/~rclamp/File-Find-Rule-0.32/lib/File/Find/Rule.pm

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives