Firefox on MacOS: Default filename when downloading

When downloading from Firefox on MacOS, I would like the filename to be prefixed by the ISO-date (YYYY-MM-DD-original-filename.extension). This can be achieved with a folder action in the downloads folder, but I want it to be in all folders, so a folder action is not an ideal solution.

If possible I'd like all new files to have the prefix, regardless of the creating app.

Is this possible?


Solution 1:

My solution was to make an Automator workflow to run a shell script, and map it to a universal keyboard shortcut. This has been very useful to me, so here it is:

# echo `date +"%Y-%m-%d "` + " "
A=`date +%F`
echo "$A "

Screenshot of opening Automator and create new workflow

Open Automator and create new workflow.

Screenshot of creating workflow to run shell script

Set workflow to receive text from any application, choose to replace the selected text and add Run Shell Script. Choose /bin/bash and pass input to stdin. Paste the script and save.

Screenshot of *Keyboard Shortcuts* in *System Preferences* Go to System Preferences, choose Keyboard and Shortcuts. Choose Services, find yours on the list and map a shortcut.