Monitor Completion of Transfer of Files into Folder

Is there anyway that I can monitor when the transfer of a set of files into a folder is complete?

For example, I'm transferring 100 files from Folder A to Folder B. How can I set a flag (e.g. variable) that says Folder B is no longer receiving any new files?

Thank you all!

There's probably several ways to do this, but one (untested) is to create a Macro with a Periodic trigger of, say, 1 min, to count the number of additional files in the folder. You could make it less, but unless it is super important, I would not go less than 10 sec.

If you need more help, just let us know.

May I ask for a clarification. Are you using a KM command to copy the files, or some other method? If KM is the entity issuing the copy, that may make it easier.

I was using automator to move files. I can always use KM to move the files. If so, any suggestion on how to monitor the completion of transfer?

Automator? Hmm. In Automator you can run a shell script. Shell script commands can be used to trigger KM macros. So you could send KM a message from within Automator that you have finished copying files by performing the correct command inside Automator to trigger a KM macro. This could work, based on what you've told me so far. but if this won't work for you, tell me why, and we can find a way to make it work.

That's a great suggestion. Automator performs actions sequentially. All I need is to add an applescript calling for a KM macro after the "move" or "copy" command in Automator. When Automator finished the file transfer, it will execute the next step calling for the applescript that activates the KM macro.

What about running the Automator workflow directly from KM? You could include it in your macro directly and keep things simpler.

https://wiki.keyboardmaestro.com/action/Execute_an_Automator_Workflow

Glad I could help. That gets my day off to a good start. GG's idea was also valid and I hadn't thought of that.