I would like to be able to keep the most recent version of a certain file extension and move all other files older than the most recent version to another folder. I usually use Hazel for all my folder monitoring but currently Hazel breaks down when there is mixed file types in a folder and can not achieve this.
I am finding it difficult to find a solution using Keyboard Maestro as well. I can use the action “Move or Rename a File” but it is a file extension I want to look for and not a specific file.
Folder Trigger: file added
if %TriggerValue% has the right extension
For Each file in the folder
if the file has the right extension
and the file is not %TriggerValue%
then move/color the file
Thanks Chris, I will work through what you posted, thanks for all the details I will see what I can figure out.
Sadly, Peter I usually get lost when you reply with these values, if there are posts where you type like this and then show a screenshot of a plug-in that equates to what I would add I could figure how these translate back to Keyboard Maestro better. Verbally all that makes sense though and would be about what I would type if I never knew Keyboard Maestro exsisted. Connecting the dots is where it is not clear. I am not at all trying to be mean or disrepectful, I am always apprcetive of any help I can get, since any reply is out of the goodness of your heart!
I am still trying to digest this macro, how would one know to put “%Variable%Path%” in for the Move. Where did that name come from? I didn’t see anything explaining that on the help for this action folder.
Path is simply a variable name Peter has used in his For Each action.
I discourage this usage in general, because it APPEARS that it might be a reserved word/name/object. The eyes travels right over it and sees it as path instead of as a variable representing a path string.
I tend to use “pathStr” or “pathVar” instead to make it more clear that I’m working with a variable.