Have looked at previous posts relative to this query but still gormless.
In Finder or Forklift just want to manually select one or more files (start with 1 so I understand that and copy to a folder. The destination folder is always the same folder as it is process folder.
Very basic. How do I specify in the action that the file that is selected by user is what I want to copy?
Looked at simple Copy action but do not know what to put in the copy field. Clicking the folder button will result in an individual specified file but that is not what I want. For any selection selected in Finder or Forklift is what I want.
To copy a single file selected in the Finder to a set Folder you can use the Keyboard Maestro Token %FinderSelection% in the first field of the copy Action and put the path to the folder you want to copy to in the second field.
For a Macro that works with either a single selected file or multiple selected files in the Finder you can use a For Each Action. The For Each Action is a looping Action. In this case it is looking at "The Finder's Selection" and it is saying, "for each item (which you give a Variable name of your own choosing such as, Local_File) in the Finder's Selection do something".
It will loop through each file you have selected one at a time, it will set the Variable Local_File to each one of them one at a time and it will end up copying all the selected files to the destination folder.
That makes sense. So if I want this to work in say Forklift or any app in which a file is selected how would I do that? Also, I looked under Insert Variables and do not see FinderSelection. Did you just create that?
%FinderSelection% is not a Variable. It is an inbuilt Token in Keyboard Maestro. Click here for an explanation.
Someone else will be able to answer that - I don't use Forklift so, I don't know. Keyboard Maestro doesn't have pre-built Forklift Actions the way it has pre-built Finder stuff.
@Zabobon already nicely covered how to work with Finder selections, so here's how you could do the same thing with ForkLift, also with the For Each action:
There is one small gotcha with the tokens %FinderSelection% and %FinderSelections% with KM v10.2.
If the selection includes a symlink, the tokens return the target file, not the symlink. I shared this with @peternlewis and he mentioned that this would be changed in a future release of KM.