Resolved Automator - duplicate, rename and move file(s)

Discussion in 'Mac Programming' started by blackboxideas, Mar 18, 2015.

  1. blackboxideas, Mar 18, 2015
    Last edited: Mar 25, 2015

    blackboxideas macrumors member

    Oct 17, 2012
    Hey all, I've been struggling to figure out how to get this workflow right and figured I'd see if anyone here could help out!

    What I'm attempting to do:

    I have a windows file server, under each client folder on here I store advertising files - within each folder I have a subfolder called 'versions' where I keep a copy of files that aren't the latest version.

    What I'd like to do is;

    1. Duplicate a selection of file(s)
    2. Move the original selection to the 'versions' folder
    3. Rename the duplicated files to remove the default 'copy' text that gets added.
    4. Rename the duplicated files to ad a sequential number into the file name.

    As an example:

    • Duplicate these file 'Advertname_728x90_v4_ms.fla' 'Advertname_300x250_v4_ms.fla'
    • Move the original file to 'versions' folder
    • Rename duplicated files to 'Advertname_728x90_v5_ms.fla' 'Advertname_300x250_v5_ms.fla'

    The default sequential numbering hasn't been much use as it isn't clever enough to pick out the 'v4' in a file name and add to that. So I realise I need some soft of applescript to achieve this. I also haven't figured out how to set the 'Move to' location as a folder called versions within the current folder.

    To aid with the explanation - here's my test flow / service so far, which works - but only picks up the 'v4' and renames to 'v5' and relies on me having a specific folder on my desktop.
  2. kryten2 macrumors 6502a

    Mar 17, 2012
    Is this what you would like to do?

    Attached Files:

  3. blackboxideas thread starter macrumors member

    Oct 17, 2012
    Hey kryten2, Yes! Exactly this!

    I'd only envisaged doing this process on one client at a time, but if it's able to process multiple folders I could probably save even more time.

    Best regards,

Share This Page