automator File renamer Variables Sequential

Discussion in 'Mac Programming' started by metsomaniac, Aug 12, 2013.

  1. metsomaniac, Aug 12, 2013
    Last edited: Aug 12, 2013

    macrumors member

    #1
    Hi
    I'm trying to create a script to help me with some batch file renaming
    In this example I would like to change the following file names:

    MVI_0001.MOV
    MVI_0002.MOV
    MVI_0005.MOV
    MVI_0006.MOV
    MVI_0007.MOV

    to

    $A_$Slate_tk_01.MOV
    $A_$Slate_tk_02.MOV
    $A_$Slate_tk_03.MOV
    $A_$Slate_tk_04.MOV
    $A_$Slate_tk_05.MOV

    I wish to add a couple of variables such as
    $A for which camera it was, could be A,B or C
    and
    $slate for the slate number

    so far I've i've built the workflow as follows
    Get Selected Finder Items
    Ask For Text (Camera)
    Set Value or Variable (Camera)
    Ask For Text (Slate)
    Set Value or Variable (Slate)

    this all works fine,
    I found this handy page showing use of this automator action called Rename Finder item by Pattern
    http://usefullittlethings.com/renaming- … cards.html

    I can follow the use of 'Rename Finder item by Pattern' but I dont know how to add the variables into the new file names...

    thanks for any insight..
     
  2. macrumors 6502a

    #2
    Don't know if this still works with SL or later versions of OS X but you can give it a try.

    In my Example :

    Camera UUID : 199ADF20-2B78-4664-A08A-569C4A3903B5
    Slate UUID : EC17BE52-5828-463E-89E4-2ADD325601DA

    In your Rename Finder Items by Pattern :

    Replace with : $(199ADF20-2B78-4664-A08A-569C4A3903B5)_$(EC17BE52-5828-463E-89E4-2ADD325601DA)_tk_01.MOV

    Info : 10.5: Use Automator variables anywhere in a workflow
     

Share This Page