I'm creating a database on Filmaker Pro (FMP) of images that will be stored in a folder. I would like this folder to have an automatic action where I can, occasionally, drag one or more image files into the folder and their "basenames" will each be automatically renamed with unique random (ten) alphanumeric series string that will not clash with whatever filenames already in the folder.
Is there a clever AppleScript or other technique to get this done? I'm a mid-level user, I only know how to use Automator, where it can't be done.
Failing an automatic solution, I could use a random string generator and change filenames manually.
Best Answer
Okay total different approach.
Use AppleScript only.
Step 1: Create folders (input and output)
Step 2: Create script
Step 3: Save script in ~/Library/Scripts/Folder Action Scripts/
Step 4: Right mouse click on input folder > Services > Folder Action Setup
Step 5: Connect script to folder.
Left part you add your input folder, click on folder in the left list. At the right list you choose your script.
Step 6: Add a bunch of files in the input folder. They are getting random names in the output folder and are deleted from the input folder.
Do not forget to change the outputFolder value inside the script!