Bulk File Renaming

An Alfred Workflow


Short Description

This workflow allows the user to rename multiple files at once using regular expressions and further options.

Last Updated

02 Jul 2016

Compatibility

Yosemite
(10.10)
Mavericks
(10.9)
Mountain Lion
(10.8)
Lion
(10.7)
Snow Leopard
(10.6)
Yes Yes Yes Yes Yes
 

Version

1.0
 

Bundle ID

de.tobias-men.bulk-file-rename
 

This workflow will only work with Alfred 3 and newer.

This workflow lets you rename multiple files at once via a file action. Therefore the workflow asks you for a matching pattern first and for a replace pattern after that. Alfred provides you with some useful predefined options. After defining both patterns you'll see a preview of the renaming result.

Step by Step

  1. You are ask to enter or choose a regular expression which should match parts of the input file. File endings are not renamed so your regex must not match a file name with its extension but only the name itself.
  2. You can use a normal python regex.
  3. You are ask to enter or choose a rename pattern (also a regular expression). Here you have the following options:
    1. $0 matches the full input, i.e. if your file is named 'foo.jpg' $0 gives you 'foo'.
    2. $1 to $9 contain the regex matching groups, you have defined previously.
    3. {n} contains a serial number which starts at 1.
    4. {d} contains the current date in the format 'YYYY-MM-DD'.
    5. You can add the following options in front of the normal pattern followed by a /:
      1. c to capitalize every word
      2. r(<from>,<to>) to replace every occurrence of <from> with <to>
      3. Multiple options can be divided by / again.
  4. After pressing enter again, Alfred shows you a list which gives you a preview of how the renaming will look.
  5. Pressing enter again will rename all files according to your expressions.

Screenshots