How do you manage renaming files?

Discussion in 'Apple' started by Roger, Jan 21, 2008.

  1. Roger

    Roger Guest

    Hi all, probably a dumb question, but how do you deal with large groups
    of files you want to move into a particular folder, that say, your
    camera has named, when the folder already contains files the same camera
    has named the same thing previously? Seems like there should be a
    fourth option to rename or something in addition to "replace," "don't
    replace," or "stop."

    Roger, Jan 21, 2008
    1. Advertisements

  2. Rename them first by using a program like 'A Better Finder Rename'.
    Johan W. Elzenga, Jan 21, 2008
    1. Advertisements

  3. Roger

    zachscrivena Guest

    Here's a small command-line Java program I wrote that does these kinds
    of renaming tasks:



    Drop the "IMG_" prefix:
    java -jar RenameWand.jar "IMG_<a>" "<a>"

    Replace filenames with "mypics" followed by a 3-digit number starting
    at 42, ordering by original filename:
    java -jar RenameWand.jar "*.jpg" "mypics<3|41+#FN>.jpg"

    Hope that helps
    zachscrivena, Jan 22, 2008
  4. No. Anything done by this script, the user could type in directly.
    The problem you have in mind would be if this script where "setuser"
    or "setgroup" or were running as something like a CGI script, so that
    the script would be running as a different user from the person using
    it. And in that case, perl would turn on taint mode, which I believe
    would prevent the eval from happening.

    - Bill Mitchell
    william mitchell, Jan 22, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.