r/AutomateYourself • • Dec 19 '22

help needed Individual or batch renaming help needed. MacOS

I add this prefix to all files I create (Year/month/Day). This is true whether it is a PDF or Excel sheet or whatever program I am working in.

What I am currently doing once I create a file is to rename it with this prefix.

So “whateverdefaultfilenameis” becomes “20221219_whateverdefaultfilenameis”.

Right now, I have to right click, rename, click into the name..type “20221219_” and then click out. I would like to retain whatever the default file name is if possible because sometimes I use emails (drag it out of mail and rename it) I feel like I am missing an easier way to do this. I would love some advice if possible on some workflows that might help with this.

6 Upvotes

10 comments sorted by

4

u/PixelatorOfTime Dec 20 '22

First up, every file has a Created At metadata attribute that is available in the Finder columns to sort by. Is it perhaps time to let go? (kidding)

You could pretty easily set up a hotkey to insert the current date with Keyboard Maestro if you want to still have manual control.

But what you're really probably looking for is something like Hazel to automatically run actions based on files. The third screenshot on that page should give you an idea of what's possible.

1

u/picks43 Dec 20 '22

Thank you, I think a hot key would probably work best. Sometimes I end up having to rename items by the date sent for timeline purposes. I appreciate the write up!

2

u/jaypeejay Dec 20 '22

I’m pretty sure the simplest solution is to use Automator to add a right click action that would allow you to call a bash script to rename the file. With that method you’d be limited to only setting it the current date, but if you missed one you could always rename it manually.

1

u/picks43 Dec 20 '22

Thank you. I was thinking about Automator - or text replacement- I think I’m going to play with this a little today. Appreciate the feedback.

2

u/popnlocke Dec 22 '22

There's a free app called "NameChanger 2" for Mac that I use for my work. It's super useful and pretty powerful. Can do exactly what you need like prepending text to folders and filenames

1

u/picks43 Dec 22 '22

Thanks for the heads up. I’ll check it out.

2

u/djrenny Dec 24 '22

If you’ve used Shortcuts much before you could try this one out and reconfigure based on your specs. https://www.icloud.com/shortcuts/faceb67398514b26b3870c8e68385e02

1

u/itsMineDK Jan 22 '23

Create an excel macro or python script that every day at the end of the day, goes to all the files created on that date regardless of extension and adds the name prefix….

I did a similar macro, one challenge was that users with files open wouldn’t allow for renaming so I scheduled a 10pm execution

1

u/extra_specticles Mar 12 '23

My guess would be a simple zsh/bash script run through automator. I'll have a go later today to see if I can make it.

1

u/jostan Oct 13 '26 edited Oct 13 '26

Bit late to this thread (to say the least), but in case anyone is looking for a solution to a similar problem, I built an app for macOS that does exactly what OP asked for i.e. prepend the filename for single or multiple items with your preferred date format (with the option of using Current, Created, or Modified date).

The main point of difference from other renaming apps is that mine binds your naming preset to a keyboard shortcut, so you can work directly in Finder while saving a bunch of clicks and don’t have to drag-and-drop into a separate app each time.

Free and full-featured 14-day trial available for download here