Quickly adding the date to a file name on Mac

«Time is the fire in which we burn …»
Dr. Soran in «Star Trek: Generations»

When adding images to an Obsidian Vault, it is annoying when images have the same file name. Then you need to specify the path and it makes reference to the image more difficult and cumbersome. The same is true when you want to put the image in a folder that already has a file with this name.

An easy solution is to just add the date to the file name. You could also additionally add the time, if you have multiple images with the same name on a given day. Or just use consecutive numbers. I also prefer to add the date after the filename, as it makes sorting by name more useful (you can additionally sort by time in Finder via the creation or modification dates in the file attributes).

As adding it manually is annoying and does not scale well, you can use Automator on the Mac. Just create an application, get the selected Finder items and rename them. You can chose different dates (e.g., creation date or current date), formats, where to put it, separators, or include leading zeros (I do so, makes sorting easier).

Afterwards, you can put the application somewhere easily accessible. I prefer the Dock. (I also added an icon. Just create a small image, click on the application file, right-click, Get Info, then drag the image on the icon in the Info dialogue, it’s on the top left).

If you want to add the date to the file, just drag it onto the dock icon and voilà.

Happy renaming.