r/applescript • u/conflob • Mar 21 '23
Renaming files in bulk using Apple Script
I currently use windows and have a piece of Command prompt script that will rename all files in a folder, the template of the command prompt is this: ren "example.jpg" "example-1.jpg"
This would change the jpg called example to 'example-1'. I copy this formula in Excel with a list of the file names, when the column of these scripts is copied into the command prompt within the desired folder, it will rename all the files.
I'm struggling to find an equivalent process on mac using AppleScript. Can anyone help?
For context, I will be working from an excel sheet with the old file names in one column, and the new names in another column, so if I can get a set piece of code like the above, I can concat all the relevant names in excel for each file.
Thanks
View all comments
Show parent comment
1
u/conflob Mar 22 '23
I didn't add the file path as I just open cmd prompt from within the desired folder by just typing cmd into the address bar in file explorer, that way I can bypass that stage, apple script can also be opened within a file so I thought it might work the same, I'll give that a try