Rename Files in a Folder Based on a List in Clipboard

I like VSC and have mixed feelings about Sublime – unfortunately neither of them is AppleScriptable.

I use VSC for writing JavaScript and a few other things, but my daily driver is BBEdit and has been for about 30 years now.

  • The appended macro makes use of a rename map table in a BBEdit document named “File Rename Map.txt”.
    • The BBEdit document MUST be named this way, although the user can change this if desired.
  • The Target-Directory is the FRONT FINDER WINDOW.

Note:

  • I have not taken the time to build in error-checking for a missing rename table window and various other things.
  • If I was building this macro for myself I'd have done all the heavy lifting in AppleScript.

Download: Rename Files from Text Table in BBEdit v1.00.kmmacros (7.5 KB)

Macro-Image

Keyboard Maestro Export


Operation Instructions:

  1. Create your rename table.
  2. Make sure it is named “File Rename Map.txt”.
  3. Make sure the table is open in BBEdit.
  4. Make sure the target directory window is open in the Finder and FRONTMOST.
  5. Run the macro.

Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 10.14.6
  • Keyboard Maestro v10.2

1 Like