Watchfolder Script: To change filename of new files to timestamp

I use an Automator Folder action to rename all newly added files to a folder to a filename set to the file's creation timestamp. So they always sort by the time of creation

20220624_135953

The FolderAction script works, but there is a delay like 6-7 seconds before the file is renamed.

How can I do the same using KM9, so that newly added file is renamed without this delay

Got it. KM is as slow as Automator.
A nodeJS watch folder is faster.

I had this working pretty well using the folder trigger and native KM actions, but renaming or duplicating the file triggered the macro again. I didn’t like any of the workarounds I came with. Like including a code in the renamed file that would be ignored so by the macro so it wouldn’t trigger again. Then life happened and I didn’t get back to it. Glad you found a solution.

Glad you took the time to reply.:clap:

1 Like

If you do not mind to share.
How have you setup the nodeJS watch folder?

Sharing is Scaring,

HTH :slightly_smiling_face:

1 Like

The simplest way round this is to split your workflow into a watched folder and destination folder(s) -- file hits the watched folder, macro triggers, file is moved to the destination folder and renamed.