How the script for batch renaming files works

  1. Launch the Script and it will ask to selected the desired files
  2. As a second step, the user is prompted to specify the new file name
  3. That’s it: the script renames the chosen files with the new file name and a sequential index number

How about drag’n’drop support for renaming files?

Thanks to the great feedback in the Gist, I added a second variation of the AppleScript that allows creating a Droppable Application – now all you need to do is drag’n’dropping the files on it, in order to start the batch file rename process.

Here’s the code to batch rename files using AppleScript

Simply copy-paste the code snippet into Script Editor in macOS, save it as any type of application – and you’re good to go.

There are 2 different code snippets as of now

A GUI version

files & file name must be selected manually by the user

A draggable version

files can be drag’n’dropped onto the script’s app icon, file name must still be entered manually by the user

https://gist.github.com/oliveratgithub/b9030365c9ae483984ea

Do you have any suggestions? Feel free to fork the snippets on Gist or add a comment.

Share:
  • 0
  • 1

Questions? Suggestions? Let us know with a comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.