On Nov 19, 2007 10:32 PM, Allison Baldoni <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to write a script that will browse a windows directory and rename > all files in it and its subdirectories. A file name such as > 123TEST987.docneeds to be renamed to > 123987.doc. all files have TEST in the name. > I am unsure of the best way to do this. I have been trying to use globbing > and substitution (to substitute TEST with nothing). I am unsure how to > rename files in multiple directories. > > Thanks >
You want the File::Find* module, the rename** function, and probably a regex*** to determine if the file name contains TEST. * http://perldoc.perl.org/File/Find.html ** http://perldoc.perl.org/functions/rename.html *** http://perldoc.perl.org/perlretut.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/