http://www.perlmonks.org?node_id=198674


in reply to Recursively renaming files matching specific patterns (was CityCat)

Welcome to the Monastery!

You are correct, this is a pretty commonly asked question. Have you checked some of the available materials? Here are a few possible avenues for you to explore, which I found by spending a few minutes working with some of the basic tools we have available:

  1. Typing rename file into the Search box shown above located these nodes:

  2. Typing Recursive rename into the above Search box lead to a node with the same title, which uses the File::Find (alt.) module mentioned by insensate.

    You may notice that it's in a section called Cool Uses for Perl. We have a few different sections along these lines, each showcasing a variety of Perl techniques that can be adapted for a variety of purposes.

  3. Also, the Files section of Categorized Questions and Answers lists a potentially useful entry: How do I do a bulk rename?

  4. Are you aware of the POD documentation provided with Perl? I noticed that perlfaq5 (which you can read from the command line by typing perldoc perlfaq5) contains an item called How can I reliably rename a file?.

  5. Also, one of our most prolific monks maintains an archive of the magazine articles he's written regarding Perl. Quickly browsing those, I found several that you may find interesting, including:

    Note that these are roughly in order of publication, so you may find the ones at the bottom of the list more helpful than the ones at the top of the list. Remember: Perl is dynamic and "best practices" evolve over time.

  6. Update:1 In another area of the site, Best Nodes, you'll find threads that've gotten the hightest response from the members. You might be interested in this one, which is one of the oldest threads on the site. While a node's appearance on Best Nodes isn't always a sign of node quality, it does indicate a form of appreciation.

    If you choose to continue to participate, you may find these nodes useful as well. /update

As I said, this is a short list. There are many relevant nodes and lots of existing material on the subject. Part of the fun is locating them.

Be sure to also check out some of these nodes; they're designed to help you use the Monastery's resources most efficiently.

--f

1 - How could I forget paco?