Copy a file from one location to another

Hello everyone,
I have been working on this for almost 3 hours (I am a KM noob), and have been looking through the following topics:

But wasn't able to find the solution after trying, trying, trying !

What I want to achieve:

If a file is added in folder A (/Volumes/GoogleDrive/My Drive/FOLDER) , I want it to be copied into folder B (~/DestFOLDER).
Pretty simple.

I have set up different types of actions, but in the end, I always got this error message:

Action Failed
FIle action failed because the destination already exists.

I tried to put a slash to the destination folder, and remove it.. Same result

Here is the last thing i tried:

I tried also with the variable " File " instead of " Files "

This macro works only if the folder does not exist, but if it exists, it doesn't work...

Any help would be highly appreciated...

Thanks !

Hey @spyke03,

The way your macro is currently set up, it's trying to copy every file in the Google Drive folder whenever a new file is added to it, which explains why you're getting the "destination already exists" error. If you only want to copy the newly added file, you need to use the %TriggerValue% token, and you don't need the For Each action:


Hi @gglick,
thank you very much for your quick reply.

After replicating your macro, i got this error:
File action failed because source is not a full path (null) in Macro ... while exectuing Copy File "%TriggerValue%".

Do I have to set up the trigger value first ?

No problem. I'm guessing you tested the macro by running it from the editor, rather than by actually adding a file? The %TriggerValue% token won't work with a folder trigger unless a file has actually been added to the folder in question, so try adding a test file to the folder and seeing if that doesn't do the trick.

1 Like

You're totally right !
Thank you so much, it is working now !

1 Like