MacOS – Rename files before saving

findermacos

I have a certain structure in my files (YYYY-MM-DD_name of file_MYINITIALS). I could rename existing files in batch but to do so I would have to know where they are, as they are in different folders this doesn't seem to be right solution for me.

Is there then way to add the above structure to each file I save? I.e. each time I create a new file a script or so would add YYYY-MM-DD_ before the file name and MYINITIALS right after/before I click "save".

Best Answer

You could create a program that uses Apple's FSEvents to be signalled every time a new file is created - then it could use a standard move command to give the file a new name.

Another options is using Folder Actions, but that would require you knowing which folders you want to monitor. The folder action could execute a small script you put together, that simply append the date and initials to the file name.