Molt: batch renaming utility

Hi all,
Recently I was looking for a batch renaming utility, and while I did find a few, none of them would really fill all the checkboxes of my requirements list. Either because they didn’t provide the "rules" I was looking for, or because they would rename files after each rule has been applied, or because they couldn’t be used from scripts (that way I wanted), or whatever the reason. So I made myself one: molt.
You use it by specifying a set of rules to use, which will all be processed to determine the new name. molt will make sure those new names are "free," as in not already in use; and handles "avoidable conflicts" - when a file's new name is taken by another file to be renamed (performing two-steps renaming with a temporary name if needed).
Usage: molt [OPTION]... RULE... [FILE]...
Options :
-D, --exclude-directories Ignore directories from specified files
-F, --exclude-files Ignore files from specified files
-S, --exclude-symlinks Ignore symlinks from specified files
-i, --from-stdin Get list of files from stdin
-P, --process-fullname Send the full path/name to the rules
(Imply --output-fullname)
-p, --allow-path Allow (relative/absolute) paths in new filenames
(Imply --output-fullname)
-m, --make-parents Create parents if needed
-O, --output-fullname Output full path/names
-B, --output-both-names Output the old then the new filename for each file
-N, --output-new-names Output the new filename for each file
-R, --only-rules Only apply the rules and output results,
without any conflict detection
(Imply --dry-run)
-n, --dry-run Do not rename anything
-C, --continue-on-error Process as much as possible, even on errors
or when conflicts are detected
-d, --debug Enable debug mode - Specify twice for verbose
output
-h, --help Show this help screen and exit - Specify twice for
verbose output
-V, --version Show version information and exit
Rules :
Rules are the part of molt that process filenames. Rules will be applied
in the order specified, you can use the same rule as may times as you want.
Some rules require a parameter, what it can be depend of the rule. Usually,
it will be a string where you can specify multiple parameter using slash ( / )
as separator.
--upper Convert to uppercase
--lower Convert to lowercase
--vars Resolve variables
--tpl PARAM Apply specified template (resolve variables)
--sr PARAM Search & replace a string
PARAM = search[/replacement[/option]]
If no replacement is specified, the string will be removed.
Search is case-sensitive, unless option i was specified.
--camel Convert to Camel Case
--list Use list of new names from stdin
--regex PARAM Search & replace using regular expression
PARAM = pattern[/replacement[/option]]
If no replacement is specified, the string will be removed.
Search is case-sensitive, unless option i was specified.
Variables :
You can use variables in the new filenames. The syntax is to put the
variable's name in between dollar signs, e.g: $FOOBAR$
You can also (if supported) specify one (or more) parameters, using colon
as separator, e.g: $FOOBAR:PARAM1:PARAM2$
Variables are not automatically resolved, you need to use the rule --vars
in order to have them resolved, which gives you the ability to determine
when resolving happens, and continue processing with more rules afterwards.
Note that rule --tpl also resolves variables.
NB[:PARAM...] Counter, incremented for each file using it
You can specify up to 3 parameters:
- the minimum number number of digits (padding with 0's)
- the starting value of the counter
- the increment (can be negative)
E.g: $NB:3:42:-2$ will resolve as 042, 040, 038, etc
_[:PARAM...] Magic variable: specify "variable" as parameter
The first parameter is the name of the "variable" to resolve.
Resolving is done running the corresponding command line, using output
as value (removing trailing newline (\n) if present)
Links:
- Slightly more verbose description
- Source code
- PKGBUILD in the AUR
Hopefully someone may find it useful.
Cheers,
-jacky

Yes, this works. However, this was already part of my workflow.... and not where the trouble lies.
After exporting jpeg images from Aperture, they carry the same name of the original RAW files, from which they came. (So, IMG_8342.jpg would have started it's life as IMG_8342.CR2.) But we dont' send them out like that. We sequentially name them 0001_image.jpg, 0002_image.jpg, etc... So after renaming, how do you find the original file again, right?
BEFORE the renaming phase, I would run the "Store Original Names in Spotlight Comments" action. That way, I could look at the comments for a derivative .jpg—whose name has now changed—and determine the name of the ORIGINAL file.
After renaming, the derivative file might end up being named 0361_image.jpg, but it's Spotlight comments would say, for example, Original Name:<<IMG_8485.jpg>>. Then I would know that this particular file started off as IMG_8485.CR2.
As such, I could quickly/easily backtrack, knowing that the original RAW file was named IMG_8485.CR2
The issue is that once you've gone thru the effort to ADD these spotlight comments, if you THEN go through a re-naming step, this erases all those Spotlight Comments. That was my problem... Getting the Spotlight Comments in place was never the issue. KEEPING them there was the problem.

Similar Messages

  • Batch Renaming loses Spotlight Comments, Os X to blame?

    I posted this over at the Adobe forum for Bridge, however, I'm going to post it here too because part of me feels like this issue I'm experiencing is tied to a recent Os update: from Leopard to Snow Leopard.
    I'm a photo editor for a wedding photographer and have been implementing some of my own personal workflows into his pipeline. I tend NOT to rename camera-generated files, at all, unless there's an important reason to do so. Sorting an entire wedding by "Date" works perfectly for building the proper timeline for a shoot. So camera-generated file names are perfectly okay for our needs.
    When an edit is complete I'll generate JPEGs from Aperture. The resulting files will continue to carry the original RAW files names, unless there is a duplicate file name, then Aperture will add a number: "(1)" to the file, if necessary. Typically, after export, I run an Automator action that stores the file name in the Spotlight Comments. Because prior to shipping and archiving, I AM going to rename the final JPEGs sequentially: 0001_wedding, 0002_wedding, etc.
    The beauty was that with the original name stored in the Spotlight comments for the JPEG, I would easily look at 0148_wedding.jpg, see that it's spotlight comments said, "Original Name: IMG_3471" and obviously know exactly what RAW image this new JPEG started as. Worked perfectly.
    So process was: Export, Store Original Name in Spotlight Comments of JPEGs, Batch Rename (sequentially) based on date modified in Bridge CS4.
    Well now everthing's changed. We had a system drive go down. We were running 10.5.8. When the system came back from the shop, with a new drive installed, it was/is running Snow Leopard. 10.6.3? I think. Snow Leopard, no doubt.
    And now my prior workflow has been wrecked because the act of renaming, in Bridge CS4, erases all those handy Spotlight comments. However, part of me is wondering though if this issue is rooted more deeply, at the OS level? Because R-Name (Batch renaming utility) is now eradicating Spotlight comments as is an Automator action built for the same purposes. This all used to work perfectly. And the one major change that has occurred was this "upgrade" from Leopard to Snow Leopard.
    So, question is: is there something I can alter in Bridge Preferences to maintain my Spotlight Comments, when batch renaming? Is this all tied to the Snow Leopard? Is there ANY renaming utility that's not going to fall victim to whatever the hang up here is?? How can I batch rename and not destroy my lovely Spotlight Comments in the process?
    Thanks for your time!!

    Yes, this works. However, this was already part of my workflow.... and not where the trouble lies.
    After exporting jpeg images from Aperture, they carry the same name of the original RAW files, from which they came. (So, IMG_8342.jpg would have started it's life as IMG_8342.CR2.) But we dont' send them out like that. We sequentially name them 0001_image.jpg, 0002_image.jpg, etc... So after renaming, how do you find the original file again, right?
    BEFORE the renaming phase, I would run the "Store Original Names in Spotlight Comments" action. That way, I could look at the comments for a derivative .jpg—whose name has now changed—and determine the name of the ORIGINAL file.
    After renaming, the derivative file might end up being named 0361_image.jpg, but it's Spotlight comments would say, for example, Original Name:<<IMG_8485.jpg>>. Then I would know that this particular file started off as IMG_8485.CR2.
    As such, I could quickly/easily backtrack, knowing that the original RAW file was named IMG_8485.CR2
    The issue is that once you've gone thru the effort to ADD these spotlight comments, if you THEN go through a re-naming step, this erases all those Spotlight Comments. That was my problem... Getting the Spotlight Comments in place was never the issue. KEEPING them there was the problem.

  • Renaming NEF file no longer changes JPG file automatically (NOT BATCH RENAMING)

    For the last year I have been able to select a file in Bridge under the 'Content' tab and in renaming an individual NEF file, Bridge would automatically change the corresponding JPG for me. Suddenly it no longer works and I have to change each file independently. Batch renaming still works fine, but I don't want to use that every time, as that is a bit conveluded to change one letter/number in the file.
    Not sure if it was an update that changed something since the updates are automatic. I'm not finding anything in the 'Preferences' or any other area to change the setting back. How do I get it back to the way it was???

    Hi Don, and a warm welcome to the forums!
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.

  • Batch rename improvements

    While liking the batch rename feature, I'd like to suggest some improvements:
    1) The ability to save renaming schemes - eg "standard", "web"
    2) Character replacements - eg new filename = first 5 characters of old filename + "dog" + all characters after 16th character of old name
    3) Search and replace - eg replace "dog" with "cats"
    If any of these aren't clear, I'd happily elaborate.
    John

    I second the request for improvements in batch renaming. In my view the "standard" for this function is the Bulk Rename Utility (www.bulkrenameutility.co.uk) by Jim Willsher and Paolo Messina, if I were Adobe I would look at that feature set as the goal.

  • Batch renaming of files in Mac

    I have a large number of files I want to rename. I was used to doing it in windows by doing a "group select" and then changing the prefix to the names so it would "add itself" to the front of the file names selected. Can a "batch rename" be done in OS X? How?

    Thanks, VK. I finally found the "Apple Script" utility by doing a search as the Utility did NOT appear in Finder when I looked at the Utilities section. I surmised that the buttons at the top of the window would run the utility. I highlighted the files whose names I wanted to change which contained the words "Natchez Trace" and then ran the "Replace Text" script utility. I clicked on the run, put in the text I wanted to change, i.e. "Natchez Trace" and then entered the text I wanted to change it to, i.e. "Brendas Electric Service". It seemingly ran but nothing happened at all. Apparently, it didn't work. These files are located in an external hard drive and are photo files. I have the do dad on the bar at the top of the screen now, but, unless I've overlooked something, these script utilities don't work. Can you offer any help or ideas about what I can do to make them work. JCH

  • Problem locating photos in LR5 after batch renaming them

    Hello
    I imported and edited several hundred photos. Then, I batch  renamed several dozen photos using Bulk Rename utility. Naturally, LR showed an exclamation mark icon in the upper right corner of each of the missing(renamed) pics. After clicking on the exclamation mark I choose "Locate" and manually located the photo. On the bottom I checked the "find nearby photos" checkbox. LR located the missing photo but doesn't see the other renamed photos. I think the "find nearby photos" is only useful when you move photos to a different folder, not when you rename them. Any solutions for my situation?

    Yeah, I guess it's the only way. Thank you. This is silly, but for some reason I thought I wasn't able to batch rename in LR

  • Any way to batch rename photos in Finder?

    After three days of wrestling with iPhoto '09, rebuilding libraries, etc., and following advice of helpful knowledgeable folks on Apple Support Communities, I have failed to prevent the crashes that follow every attempt to export retitled photos to a USB drive or garbbling up the the photos in the newly created libraries.  I am still open to tips from the Apple Support Communities but my hopes are not high.
    Another way I am hoping to complete the task is to drag the photos from iPhoto to the USB drive (or Desktop), but the new titles do not come through and all revert to the original file names which are cryptic.  So, my question is if there is a way to "batch" rename the photos on USB, but such that I can enlarge the thumbviews to enable me to better identify which photo is which?  I can not find a way to rename the files in batches in Finder.  Does OSX offer any utility in any of its other features?  Do I need to get an App online?

    You can use this Automator Service.
    1. Open Automator
    2. Select Service
    3. Select Rename Action, [✓] Show this Action when the workflow runs.
    4. Save as Rename
    The Workflow is:
    Now, select the files in Finder, right-click and select Rename:

  • Adobe Bridge Batch Rename Stopped Working

    ive been using bridge exclusively to rename/
    organize my files and today for some odd reason it just will not work. i select the files i wish to rename and then select batch rename and name/numer the files as ive always done before and when i click rename nothing happens at all. i cleared out my cache to no avail and im now officially stumped. any help is appreciated. thanks!

    Your problem does seem odd.  Difficult to troubleshoot by remote, so run a few tests and see if you can narrow the problem down.
    By any chance are you trying a batch re-name of files on an external drive?  If so may be permissioning problem.
    Do you have this problem in all folders or just one?  If one there may be a contaminated file or name (i.e. flower.jpeg.jpeg)
    To avoid fouling up your files copy a dozen or so and put in "test"  folder then run these tests.
    Can you do a simple rename of one file?
    Can you do a batch rename of one file?
    If the above is true can you do batch rename for all files in this folder?
    If so does the extension make any difference - jpeg, psd, etc.?

  • Adobe Bridge CC: Batch Rename using any metadata field

    How can I add certain Metadata fields to the pull down menu in the batch rename function?
    I need to do a batch rename of files, but using metadata fields that are not available as an option on the pull down menu.
    Hoping to use any or all of these:
    Audio : Artist, Album, Genre
    IPTC Core : Description, Keywords, etc..

    I don't think there is any way in which you can add to the built-in functions…
    Unless this is actually provided by one of the Adobe start-up scripts… ( I've not see it when digging about )
    You would probably need a scripted solution that can give you drop down menu of the extra options you want.

  • How can I Batch Rename Files in Aperture?

    Yesterday I imported some new photos and accidentally used the settings from my last import which named my images in a way that needs to be changed. I have already rated and edited many of the images so I don't want to reimport them from my memory cards.
    Is there a way to batch rename the images - preferably to the original file name from the camera? If not a custom name would be fine.

    Metadata->Batch Change

  • Batch Renaming with Counter

    I am trying to do batch renaming with a counter. Unfortunately every time I try to use a counter, it stays the same number.
    For example/
    I have two clips that I want to rename Ceremony 1 and Ceremony 2. When I do the batch renaming, the clips change to Ceremony 1 and Ceremony 2. The counter doesn't work.
    I could do keyword collections or rename them individually, but I have too many clips.
    I hope someone could help me.

    I figured it out. As you saw above, I wasn't having a problem batch renaming the title of the clips. I was having a problem with the counter. I learned in a previous posting that when you change the name of a subclip of a clip, it changes the name of both the original clip (clip in event browser, not hard drive) and the other subclips associated with it. It doesn't matter how you rename the clip (changing the name in the Name box of the Inspector, change it by clicking the name of the clip once in the event browser and typing it in, or using custom naming (click on the gear button in Inspector to find it), the name will always change correctly. For some reason (I guess a FCPX thing lol), you can't use the counter in custom naming correctly unless you change the original name through custom renaming. If you change the original name of a clip the other two ways, then try to change the new name of the clip using custom renaming with the counter, the counter will always stay the same number.

  • Best practice guide for Batch Load utility in Oracle UCM.

    Hi,
    Is there any best practice guide for Oracle UCM Batch Loader utility.
    We are looking for information regarding batch size in terms of number and size of contents. Also is there any loading time standards considering the contents are uploaded in filesystem where filestore provider is configured?
    Thanks,
    Krishnendu

    Hi ,
    There are no specific set of steps / practices for batch loading contents to ucm . It would be very much dependent on how many contents does the user have to load to UCM and how well the server is configured in terms of performance .
    You can get more details from the following documentation link : http://docs.oracle.com/cd/E21043_01/doc.1111/e10792/c02_settings009.htm
    Thanks,
    Srinath

  • Batch rename in Adobe CC Bridge does not work. Is there any fix for this problem?

    Hi,
    I'm using Adobe CC Bridge to batch rename a folder of RAW files. Version 6.0.1.6.  I've got the latest Mac Pro running Maverick.  I set up the parameters in the Batch Rename tool, but when I hit Rename, nothing happens.  Is there anything I can do to fix this problem?  Is anyone else experiencing this?  Adobe can you fix this bug?

    I am experiencing this same (or related) bug with using the batch rename inside of Bridge CC (Mac OS X 10.9.5).
    First I filter out a subset of a folder of images that I want to batch-rename, then on the 12 or so thumbs I selected, I invoke the "batch-rename" dialog box... it presents its usual options, which work the first time. Subsequent attempts fail.
    I close the search filter, I re-type my filter, I close the bridge window, re-open the bridge window, etc. to no avail.
    It's interesting to note at this point, the program won't quit; it has to be force-quit.

  • Batch Rename Sequence Letter Doesn't Start with A

    I'm using Adobe Bridge CS3 to rename files.
    Several of the files require me to use the SEQUENCE LETTER function under BATCH RENAME.
    However, the names of the files contain a sequence of letters that start in the MIDDLE of the ALPHABET (i.e.  C, D, E, F, G, etc...)
    I can't find an option to let me start lettering form a letter other than A.
    Help!
    Thanks,
    jjfosho

    I have 3 monitors hooked up and running, the only port not in use is the mini display port (I do not have an adapter).
    All 3 screens are blue and the mouse and key board are not responsive.
    If i take out the other card (ATI Radeon HD 2600) it Tells me I need to restart. Every time i do it comes up with the same thing.
    Is the card Bad or something else?

  • Adobe Bridge CC Batch Rename and File Extensions

    I use Adobe Bridge CC on my macbook pro that is running OS X 10.8.5  When I batch rename files within Bridge it automatically drops the file extension. I am able to add the extension within the naming process but would prefer if it simply defaulted to the existing extension of the files being renamed. On occasion it does do this and then the next time it is gone. What am I doing wrong?

    I don't think there is any way in which you can add to the built-in functions…
    Unless this is actually provided by one of the Adobe start-up scripts… ( I've not see it when digging about )
    You would probably need a scripted solution that can give you drop down menu of the extra options you want.

Maybe you are looking for

  • HT4759 My apple id is not a valid Icloud account

    I have tried several times to login into iCloud but it will not accept my apple ID

  • JDeveloper extension with XSL mapper

    We want to develop a JDeveloper custom extension (a wizard). In one of the wizard pages, we want to use the JDeveloper's XSL mapper for one of the function. Can you please advise whether it is possible. If yes, any details would be highly appreciated

  • EU tax system - France/Germany

    Hi, Scenario: Customer belongs to DE (Germany), Customer will order to 1000 company code (Germany). The company code DE will create sales order with one plant, which is belongs to France company code. It is just like a intercompany third party billin

  • Adobe Flash Player update not working

    July, 1 2012 Since loading flash player update Adobe Flash Player 11.3.300.262 my YouTube links and other videos sites won't play. I removed the update and they did play. Then reinsdtalled  it again and it wouldn't play. My browser is Foxfire 6.0.1

  • Apple bluetooth keyboard and Magic Trackpad are sluggish and constantly disconnecting - I'm in pain

    Dear Apple, Bluetooth issues are damaging my job as I rely on external display and periphery. The connection is not interrupted too often like it was before 10.10.3, but it still does, and when it doesn't - the performance is very sluggish. If you ca