Advanced Batch Rename using RegEx?

Hi all,
I've got hundreds of files to rename, they're all images of vehicles that have been named based on their reg, there are 8 images per vehicle denoted by the number 1-8 immediately after the reg nuber.
What I need to do is insert a _ between the end of the reg, and the number at the end (1-8), I've had a look around to find a regular expression to try to do this in the string substitution option. But can't find one anywhere, and can't for the life of me figure it out myself because this is the first time I've ever seen regex etc.
All I need to do is select the last character of each file name, any ideas. Example:
Currently named:
BX59AHB1
Needs to be:
BX59AHB_1
All the registrations are different, and on the end of each is number either from 1 to 8. Any help would be greatly appreciated because it will takes hours to go through them one by one.
Cheers.

Regular expressions are very useful stuff and NOT just to scripters… You should be able to do much more with Bridge's Batch Rename now that it has this addition.
There is only 1 line of text in a file name you may not actually need the ^
No the files will not all end up with an _1 the expression \d matches any digit [0-9] which 1 thru 8 are part of… So it will put whatever digit was in that position back…
http://www.regular-expressions.info/reference.html

Similar Messages

  • 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.

  • Can you batch rename tracks in iTunes for Mac?

    I want to do a sequential track naming, but I can't figure how to do this and the Doug's applescript isn't working - it renames my FILES instead of the TRACKS!
    These tracks are from an audiobook on CD, and it's tiresome to have to search for the "part" when all the tracks are numbered 1-99 and the only thing keeping them from being in the wrong order is the fact that I told iTunes the disc order in the 'Get Info' menu. It wouldn't be so hard on the MacBook, but I usually listen to these on my iPhone, and scrolling through literally hundreds of tracks takes forever, and sometimes I STILL can't find which track was playing last!
    I've done a batch rename using an Automator workflow setup I found on the web, but I can't find anything that lets me actually rename the tracks. I've even deleted the tracks from iTunes, renamed the files, deleted the faulty script that screwed things up, and it STILL comes up with the weird numbers and track numbers and renames the files in Finder!!!
    I'm getting really frustrated with this and don't want to have to rename tracks by hand because that takes HOURS.

    Hi,
    Here is an AppleScript example of how to rename tracks in iTunes :
    display dialog "What will be the base name?" default answer "Track "
    set baseName to text returned of the result
    set n to 1 -- the starting number
    tell application "iTunes"
          repeat with thisTrack in (get selection) -- rename selected tracks
                set name of thisTrack to baseName & n
                set n to n + 1
          end repeat
    end tell
    Without more information, I can not make script specific to your needs.

  • How do I remove a number sequence using batch rename

    Hi
    I know I've done this in the past but cannot seem to work it out today.
    I have a series of images "_####_[layercompName].png".  I would like to remove the underscores and numbers.  The underscores removal is easy, but how do I remove the numbers (####) when they are different for each filename?  I would like the end result to be [layercompName].png
    The reason I have these filenames in the first place is that I have run the photoshop script "layer comps to files", and this adds a number sequence prefix.  I have tried to alter the script following various instructions I've found from trawling the internet (this one included How do you remove the number sequence when exporting layer comps to files? CS6. Windows 8.) but without any luck.  So now I'm resorting to batch renaming in Bridge.
    Thanks!

    Here you go, taken straight from: DesignEasy: How to Remove Sequence Numbers and Empty Spaces When Exporting Layers and Layer Comps
    Run Adobe Bridge and navigate to the folder with exported files.
    Select all files which have sequence numbers.
    Go to Tools > Batch Rename.
    Choose: String Substitution from the first drop-down list in New Filenamessection. From the second drop-down choose: Original Filename. In the Find: text field type: _\d{4}_ (underscore, backslash, letter d, open bracket, number four, closed bracket, underscore). Leave Replace with: text field blank. Ensure that you have Replace All and Use Regular Expression checked as shown on the screenshot below.
    Click on the Preview button in the top right corner and ensure that files will be renamed as you want.
    Click on Rename button and you are done.
    In case you are first time doing this and you still have doubts if everything will work as expected, check Copy to other folder option when renaming files. This option is located near the top left corner under: Destination Folder.
    Another thing I want to mention is to remove everything that you have below String Substitution options. In case you see additional renaming options just click on minus (-) sign on the right side to remove them.
    How to remove/substitute empty spaces in the file name using Adobe Bridge
    It is pretty similar process. The only difference is that you should type: \s (backslash followed with letter s) in the Find: text field. You can leave Replace with: text field blank or to type underscore.

  • Can't Use Batch Rename "Rename In Same Folder" for some photos

    Have a strange problem: when using "Batch Rename…" under the "Tools" menu, "Rename In Same Folder" is unusable for some photos taken with some cameras, not for others. For one example, I shift-selected a range of photos taken at a recent vacation, some with my iPhone, some with my girlfriend's Canon PowerShot SD450. Bridge renamed the iPhone photos, but not Canon photos. For another example, if I select a single photo taken by her cell phone or Canon camera, "Rename In Same Folder" is grayed-out; if I select a single photo taken my by iPhone, not so. Does anyone understand this behavior, and is there a solution?

    Bridge Support Center in the help menu leads to a 404 error page.
    Sadly enough this is also on my system (Mac OSX 10.6.8) It should not be showing 404 but it is there...
    What Bridge help files and links, forums, communities, google searches do not do is tell you how to fix what happens with the problem
    In general restarting Bridge holding down option key (in your case alt key) to choose reset preferences solves most problems.
    Here is a page from Adobe Support about Troubleshooting (although this states you should combine option/alt with cmd/ctrl but that is not needed)
    http://kb2.adobe.com/cps/317/317912.html
    I want to use Bridge batch rename to change jpegs into Mac PC compatible jpegs.
    Although I have the option for compatibility with Unix and Windows checked in my customized presets I'm not really aware of the need for that. If you have a .JPG or .jpg extension as the extension a Mac reeds and opens the file without problems. I am aware that as a Mac user I had the need to take care of Windows files in the past. Before OSX a Mac did not need an extension to recognize and open a file. Since OSX is Unix based the need to use an extension is there and also you should only use one dot (.) in the filename and that is before the extension at the end of the filename. Using spaces, commas etc is possible but not prefered. In basic, keep it simple (and short) and the file will open on all systems without problems.
    When you select a preset, the rename and preview buttons grey out. So I start all over...clear cache, check file permissions, restart/shutdown, etc
    That should not happen, presets and batch rename should be always available, even if you have only one file selected. You should start with the refreshing of the preferences. Deleting caches and checking file permissions are not needed every time for clearing prefs (although it is wise to maintain your system on a regular basis, but that is good for the use of all apps).
    On a Mac the user defined Batch Rename settings are saved in the user library / application support / Adobe/ Bridge CS5 / Batch rename setting. (not a single clue how that translate to windows but I have no reason to believe that such a file should not be present on your system.)
    Enter the term "batch rename" in the windows Bridge forum search and I got....ZERO results.
    Well, again a disappointment, there will be many result available in both Windows and Mac forum but it sure is not easy to find them
    The forum search option is next to useless. I believe you should try to switch to the main forum page or something, I once had a result but after so many tries I forgot how I managed this (combined with getting angrier every try...)
    I could really use some help because there is no way I can convert the number of files I have to make them compatible in MACs
    As stated before, if the are .jpg they are already compatible
    it used to be in CS 3 and 4 but since I "upgraded" to Production Premium suite 5.5 none of the version work.
    If you keep having problems you might consider the clean tool option to clear PSCS 3 and 4. Check also this KB article:
    http://www.adobe.com/support/contact/cscleanertool.html
    It should be possible to use all CS versions on your system but you can have only one version of Bridge active at the time. Upgrading from a single CS to a Suite should also be possible without problems but sadly enough everything that should be possible without problems is often only happening in the ideal world...

  • Sedname - Batch rename files using sed

    Renaming files using sed is nothing new, but this script makes the process a little more friendly and adds a few features, including insertion of sequential numbers and a simulation mode.  The output of any find command can also be piped through sedname.
    sedname version 1.0.0
    Batch-renames files using a sed script
    Usage: sedname [OPTIONS] SEDSCRIPT FILE ...
    Usage: find [...] | sedname [OPTIONS] SEDSCRIPT
    Example: sedname 's/\(.*\)\.jpg/\1.jpeg/' *.jpg
    Example: find /mypics | sedname 's/\(.*\)\.jpg/\1.jpeg/'
    OPTIONS:
    --sim simulate only
    --dir rename directories too
    Use #D to insert a number with D digits forming a unique filename
    Example: sedname 's/thisname.*/thatname#3/' *
    ( changes thisname* to thatname001, thatname002, ... )
    Use #0 in replacement name to insert a number if needed
    Example: sedname 's/thisname.*/thatname#0/' *
    ( changes thisname* to thatname, thatname1, thatname2, ... )
    http://igurublog.wordpress.com/download … t-sedname/
    http://aur.archlinux.org/packages.php?ID=37707

    What does it have over zsh's zmv:
    # Remove illegal characters in a fat32 file system. Illegal characters are
    # / : ; * ? " < > |
    # NOTE: ``-Q'' and (D) is to include hidden files.
    $ unwanted='[:;*?\"<>|]'
    $ zmv -Q "(**/)(*$~unwanted*)(D)" '$1${2//$~unwanted/}'
    # Changing part of a filename (i. e. "file-hell.name" -> "file-heaven.name")
    $ zmv '(*)hell(*)' '${1}heaven${2}'
    # or
    $ zmv '*' '$f:s/hell/heaven/'
    # remove round bracket within filenames
    # i. e. foo-(bar).avi -> foo-bar.avi
    $ zmv '*' '${f//[()]/}'
    # serially all files (foo.foo > 1.foo, fnord.foo > 2.foo, ..)
    $ ls *
    1.c asd.foo bla.foo fnord.foo foo.fnord foo.foo
    $ c=1 zmv '*.foo' '$((c++)).foo'
    $ ls *
    1.c 1.foo 2.foo 3.foo 4.foo foo.fnord
    # Rename "file.with.many.dots.txt" by substituting dots (exept for the last
    # one!) with a space
    $ touch {1..20}-file.with.many.dots.txt
    $ zmv '(*.*)(.*)' '${1//./ }$2'
    # Remove the first 4 chars from a filename
    $ zmv -n '*' '$f[5,-1]' # NOTE: The "5" is NOT a mistake in writing!
    # Rename names of all files under the current Dir to lower case, but keep
    # dirnames as-is.
    $ zmv -Qv '(**/)(*)(.D)' '$1${(L)2}'
    # replace all 4th character, which is "1", with "2" and so on
    $ zmv '(???)1(???[1-4].txt)' '${1}2${2}'
    # Remove the first 15 characters from a string
    $ touch 111111111111111{a-z}
    $ zmv '*' '$f[16,-1]'
    # Replace spaces (any number of them) with a single dash in file names
    $ zmv -n '(**/)(* *)' '$1${2//( #-## #| ##)/-}'
    # or - with Bash
    $ find . -depth -name '* *' -exec bash -c '
    > shopt -s extglob
    > file=$1
    > dir=${file%/*}
    > name=${file##*/}
    > newname=${name//*([ -]) *([ -])/-}
    > mv -i -- "$file" "$Dir/$newname"' {} {} \;
    # Clean up file names and remove special characters
    $ zmv -n '(**/)(*)' '$1${2//[^A-Za-z0-9._]/_}'
    # Add *.py to a bunch of python scripts in a directory (some of them end
    # in *.py and give them all a proper extension
    $ zmv -n '(**/)(con*)(#qe,file $REPLY | grep "python script",)' '$1$2.py'
    # lowercase all extensions (i. e. *.JPG) incl. subfolders
    $ zmv '(**/)(*).(#i)jpg' '$1$2.jpg'
    # Or - without Zsh
    $ find Dir -name '*.[jJ][pP][gG]' -print | while read f
    > do
    > case $f in
    > *.jpg) ;
    > *) mv "$f" "${f%.*}.jpg" ;
    > esac
    > done
    # remove leading zeros from file extension
    $ ls
    filename.001 filename.003 filename.005 filename.007 filename.009
    filename.002 filename.004 filename.006 filename.008 filename.010
    $ zmv '(filename.)0##(?*)' '$1$2'
    $ ls
    filename.1 filename.10 filename.2 filename.3 filename.4 filename.5 ..
    # renumber files.
    $ ls *
    foo_10.jpg foo_2.jpg foo_3.jpg foo_4.jpg foo_5.jpg foo_6.jpg ..
    $ zmv -fQ 'foo_(<0->).jpg(.nOn)' 'foo_$(($1 + 1)).jpg'
    $ ls *
    foo_10.jpg foo_11.jpg foo_3.jpg foo_4.jpg foo_5.jpg ...
    # adding leading zeros to a filename (1.jpg -> 001.jpg, ..
    $ zmv '(<1->).jpg' '${(l:3::0:)1}.jpg'
    # See above, but now only files with a filename >= 30 chars
    $ c=1 zmv "${(l:30-4::?:)}*.foo" '$((c++)).foo'
    # Replace spaces in filenames with a underline
    $ zmv '* *' '$f:gs/ /_'
    # Change the suffix from *.sh to *.pl
    $ zmv -W '*.sh' '*.pl'
    # Add a "".txt" extension to all the files within ${HOME}
    # ``-.'' is to only rename regular files or symlinks to regular files,
    # ``D'' is to also rename hidden files (dotfiles))
    $ zmv -Q '/home/**/*(D-.)' '$f.txt'
    # Or to only rename files that don't have an extension:
    $ zmv -Q '/home/**/^?*.*(D-.)' '$f.txt'
    # Recursively change filenames with characters ? [ ] / = + < > ; : " , - *
    $ chars='[][?=+<>;",*-]'
    $ zmv '(**/)(*)' '$1${2//$~chars/%}'
    # Removing single quote from filenames (recursively)
    $ zmv -Q "(**/)(*'*)(D)" "\$1\${2//'/}"
    # When a new file arrives (named file.txt) rename all files in order to
    # get (e. g. file119.txt becomes file120.txt, file118.txt becomes
    # file119.txt and so on ending with file.txt becoming file1.txt
    $ zmv -fQ 'file([0-9]##).txt(On)' 'file$(($1 + 1)).txt'
    # lowercase/uppercase all files/directories
    $ zmv '(*)' '${(L)1}' # lowercase
    $ zmv '(*)' '${(U)1}' # uppercase
    # Remove the suffix *.c from all C-Files
    $ zmv '(*).c' '$1'
    # Uppercase only the first letter of all *.mp3 - files
    $ zmv '([a-z])(*).mp3' '${(C)1}$2.mp3'
    # Copy the target `README' in same directory as each `Makefile'
    $ zmv -C '(**/)Makefile' '${1}README'
    # Removing single quote from filenames (recursively)
    $ zmv -Q "(**/)(*'*)(D)" "\$1\${2//'/}"
    # Rename pic1.jpg, pic2.jpg, .. to pic0001.jpg, pic0002.jpg, ..
    $ zmv 'pic(*).jpg' 'pic${(l:4::0:)1}.jpg'
    $ zmv '(**/)pic(*).jpg' '$1/pic${(l:4::0:)2}.jpg' # recursively
    (from zsh-lovers)
    Edit: tried it now, and had to remove this silly block to make it let me use alternate delimiters:
    if [ "${sedscript:0:2}" != "s/" ]; then
    echo "Invalid sed script: $sedscript" > /dev/stderr
    exit 1
    fi
    Last edited by JohannesSM64 (2010-05-31 15:29:44)

  • Photos does not display generic title of image (ex: IMG_2234) as actual title. Is there a way to batch rename all photos using the generic title?

    Photos does not display generic title of image (ex: IMG_2234) as actual title. Is there a way to batch rename all photos using the generic title?

    If you launch Script Editor and open the Help menu, you will see the APpleScript Help and a Language Guide:
    To see, which commands an application understands, open the File menu in Script editor and select Open Dictionary.  In the list locate "Photos".
    You will see examples how o script Photos.

  • Issue with Adobe Bridge batch rename crashing

    Hi, I have been trying to rename photo files in Adobe Bridge CC using the batch rename tool. I have just started using CC apps. All the updates are done. It crashes after doing just a few files. Started with 40 files at a time, crashed. Empty folder cache. Tried with 20 files, worked for a few times then crashed again. Tried 10 files and it crashed immediately. I found directions online (unfortunately it was for CS5, but I assume it's similar to CC). Any ideas on what to do differently? I really need to get these photos renamed and to a client tomorrow. Thanks in advance for any help.
    Cheryl

    Video card is updated, though I've been getting an error message on it.
    I'm not sure what this should have to do with your batch rename problem. Your specs seem more then sufficient and batch renaming does only save the files you already have cached.
    First check if you have enough free space left on your disk (at least 10 - 15 % free space is needed for good operation of your system and apps) and also try to reset preferences for Bridge by holding down contrl key while restarting Bridge. Check reset preferences from the pop up window and try again.

  • Batch Rename - Two File Formats with Same Name

    Hi everyone!
    I'm having troubles using the batch rename function i Bridge CS5.
    I've got several pictures that I've captured in both jpeg and raw. When importing the pics with windows photo import they get the same name. This means that I've got one JPG and one RAW file which contains the "same" picture, and have same name as shown below:
    What I would like to do is to rename the pictures, but still have Bridge name the same pictures with the same name as shown below:
         IMG_1268.CR2          ->          Picture 2011 - 0001
         IMG_1268.JPG          ->          Picture 2011 - 0001
         IMG_1269.CR2          ->          Picture 2011 - 0002
         IMG_1269.JPG          ->          Picture 2011 - 0002
    Is this even possible? And if possible, how?
    Thanks in advance
    Martin

    Most things are possible and so is this..
    Make sure you do a test first by copying the files to a temp folder!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    First copy the script below and paste it into ExtendScript Toolkit (this gets installed with Photoshop)
    #target bridge
    var sels = app.document.selections;
    for(var a in sels){
    var f = decodeURI(sels[a].spec.name);
    var newName = "Picture 2011 - "+ zeroPad((f.match(/\d{4}/)[0]-1267).toString(),4)+ f.match(/\....$/);
    sels[a].spec.rename(newName);
    function zeroPad(n, s) {
       n = n.toString();
       while (n.length < s)  n = '0' + n;
       return n;
    Now open Bridge and select the files you want to rename, then run the above script from ExtendScript Toolkit.

  • Bridge CS5 Win Batch Rename sets milliseconds to 000

    Am using BridgeCS5 (Windows7) to Batch Rename (either during download from Lexar Card Reader using Bridge, or during download from Canon 7D with Cable via Bridge- or to batch rename files already in a folder within Bridge)
    when I use YYYYMMDD_HHMMSS_milliseconds, milliseconds are set to 000 (thus photos are not in order necessarily if photos taken during burst mode), yet if I use YYYYMMMDD_HHMMSS_milliseconds, it sorts properly.
    Have tried this multiple times, and it is *usually* reproducable - I did a batch rename on a subset of photos, and Bridge got the rename right, but then did a batch rename on the entire lot of photos, and preview said it would set the milliseconds to 000, even on the photos it got right in the subset-experiment
    I need to use numeric month designation (MM) for proper file sequencing, as alpha (MMM) puts months out of chronological order.
    I did NOT notice this problem in the past (say, 3-4 months ago) but it is possible I missed it.
    I am NOT syncing multiple cameras or trying to integrate files from multiple cards.
    BridgeCS5 is up to date with all patches.
    (I checked the EXIF data on the files themselves, and it is correct, the milliseconds denote the proper image sequence, the camera is recording the files to card in correct sequence - in fact, exloring the card, all images are in proper sequence)
    By having files renamed (without a sequence number added to the batch rename configuration) with milliseconds to 000, not only are they out of order, but Bridge is willing to have several files with the same exact name.
    I'd be interested in a solution that allows me to continue using Bridge only for my workflow.
    thanks - stir

    Hi-
    I see milliseconds (Canon 7D) listed as
    (see Advanced tab)
    3rd folder down titled "exif Properties"
    eg: exif:DateTimeOriginal: 2011-07-30T10:43:12.64-04:00  whereby the camera has ordered the photos using 10:43:12.64, 10:43:12.99, etc when writing to the card.  (I intepret the .64 and the .99 in these examples to be the milliseconds - am I mistaken?)
    Realizing of course, the fact that Bridge is setting milliseconds to 000 is not the biggest concern, the biggest concern is that the photos are out of order when they are imported using the Batch Rename YYYYMMDD (but not when using YYYYMMMDD - notice the three M's there)
    This error occurs whether telling Bridge to sort specifically via Time or not - Bridge (when using YYYYMMDD) will reorder the images even if I don't add HHMMSS and milliseconds to the sort, or even if I do - the problem seems to be the YYYYMMDD - it may also be other Date-sorting, but so far I have only used the one (that doesn't work) and the other (that does, but is useless for keeping the dates/months in numerical order)
    Again, on CF card, the photos are properly ordered, as evidenced by the subject matter and the milliseconds shown in the DateTimeOriginal exif data
    But in Bridge, when batch renaming, the order of the photos is mixed up, and this is evidenced by the new file names (say, if I add a sequence number to the rename)
    btw, I have Bridge rename set to preserve XMP data and original file name, but whether I do or not doesn't seem to matter.
    I'm shooting JPGs in Burst Mode (shouldn't matter, as the files on card are properly ordered)
    (so far I have had 2 Canon reps tell me there are no milliseconds, but the exif data clearly shows that, I think? - I have sent them a screen shot of the file info, showing the exif field, and have not since heard a response saying "nuh uh"... it's still early in the day, though they normally respond within 30 minutes)
    Thank you for your time - Stir

  • 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.

  • Batch Rename---in Random Order

    Is it possible to batch rename a set of files in a random order? 
    Making a slideshow of a number of events, but I don't want them in the order shot.  I can manually rename and move them, or I could sort by some other order than by name or date, such as file size, I guess, but those options haven't randomized the collection as well as I would like.
    Just askin'...
    Thanks in advance.

    I’m not great with Scripts, but this might work:
    // adds random five digits numbers at the beginning of jpgs’ filenames in a folder;
    // use it at your own risk;
    var theFolder = Folder.selectDialog ("select folder that contains the files to be renamed");
    // for renaming other files than jpgs change the term in the brackets accordingly;
    var theFiles = theFolder.getFiles ("*.jpg");
    for (var m = 0; m < theFiles.length; m++) {
    var theRandomNumber = String(Math.random()).slice(3,8);
    File(theFiles[m]).rename(theRandomNumber + "_" + (theFiles[m]).name)
    One can copy the text into a new file in ExtendScript Toolkit (which should be part of Photoshop’s installation) and start running it by hitting the play-button or save it as a jsx-file into Photoshop’s Presets – Scripts; but it really doesn’t do anything within Photoshop, so it may be better not stored there.
    Anyway it’s probably be best to run it only on a copy of a folder, because getting the numbers back off later on might be bothersome.

  • Batch rename masters and versions

    Like a dummy, I imported a huge photo shoot without using the easy re-naming.
    Now, I want to rename every photo. I want to keep the numerical order, as it is critical for organizing the project photos. I want the Masters to be renamed (and I assume then that the versions just stay "version1" etc...). I have all my photos in stacks by master and version (not different masters).
    How can I batch rename, keeping the sequential order that is already there.
    (I have read the manual. I have searched on this forum. I still am a little unclear and, hence, the question.)
    Thanks in advance!

    If the images are referenced to an external location (outside Aperture's Library) then you can easily renaming them using Automator.
    Copy all the images you are going to rename to a temp location. Just in case something goes wrong.
    With Aperture closed open Automator, in the finder select all the images you need to rename and drag them to the right part of automator's screen. Now on the very left part select Finder, on the second column, near the bottom drag the rename finder items action to the right part, just under the window with all your images listed. Click on don't add so it will just rename the files (you made a copy previously). Select replace text and enter the old and new text. That way it will keep the numerical part of your files.
    Press play and wait for the action to finish.
    Check in the finder that the files have been renamed properly.
    Open Aperture and go to the project with those images. If the masters can't be found go to File/Manage Referenced files... and in there you can reconnect to the right location. Usually this step won't be needed unless you move the masters to a new location.

  • Big Big batch rename question

    Hi folks. I've seen a few batch rename questions before, but I think this one's a little different.
    I have a long (8 minute) movie, one big piece in a FCP timeline. For reasons unimportant to this question, I need to break it up into about 50 little 10 second movies. I can do that easily but using the cutting tool and cut cut cut away until I've split my one item in the timeline into 50 pieces. I can then drag them into a bin. Of course, each one is called "final" (that's the name of the movie). I can select all those clips and make them independent clips, which now allows me to rename them.
    Problem is, they need to be renamed to a bunch of unrelated words. ie "plane", "building", "sky" etc. So a simple batch sequence that names them 1, 2 ,3 is not what I'm after.
    I have an exel file with a single column that lists all these names in their proper order. So far, I have successfully:
    exported a batch list from my 50 clips in the bin that are named the same.
    replaced the file names in that batch list with the names from my column of names
    reimported that revised batch list into FCP. Their properties are all correct, ie the right name is with the right in and out points etc.
    I'm stuck now where those clips have a red line through them. How can I relink the 50 clips in the timeline (which are all still called "final") with their properly named counterparts in the bin?
    batch capture of course isn't a solution since there's nothing to capture.
    Hope that's clear and thanks in advance for any ideas.
    B

    If you're running a 32 bit version of windows try Batch Rename
    A really great piece of freeware that is easy to use.
    There are also options within PS's batch dialog that allow you to do the same thing, but I find the above app so much easier.
    I really miss it on my Vista 64 box...

  • LR5 Batch rename all photos to CAPTURE DATE+CAPTURE TIME+ORIGINAL FILENAME

    Hello there,
    Does anyone know of a way to get LR5 to batch rename all it’s photos to CAPTURE DATE+CAPTURE TIME+ORIGINAL FILENAME?
    I know the data is in there somewhere but my DATE+ORIGINAL FILENAME import rename preset has named all our photos with the date photos were imported not created (eeek!)
    Thanks in advance for any input,
    Alex

    alanterra wrote:
    If you are using Macintosh, you could also try purchasing A Better Finder Rename 9—I love it, and you can create droplets for all your file-renaming chores.
    Beware: such app is best used *before* importing.
    If you rename (outside Lightroom) after importing, your files will go missing and you'll have to re-link (or god forbid: re-import). Maybe that will be OK with you, and maybe it won't..
    Also, such app has no idea what the original filename was, so in this case it would not do what the OP wants.
    Rob

Maybe you are looking for