Move Downloads Folder Content to Desktop Macro

Why doesn't this work?

I'm guessing that the For Each "File" needs to be something like %Variable%File% and %Variable%File% needs to be set as a Trigger using the TriggerValue token as was done here: Trigger macro based on specific text in filenames?

You need to simply identify the variable, in the Move or Rename File action, to the below:

image

KC

Well, the main problem is that you have redundant Actions.

When the macro is triggered by adding a file to ~/Downloads
image

Then, you do NOT want to process ALL files in that folder -- just the one that triggered the macro

image

So, remove the For Each Action, and add this Action:

image

%TriggerValue% in this case is the full path to the file that was just added to the target folder.

I did not test this specific example, but I've used this approach many times.

2 Likes

Bern, did you ever get this macro to work? If so, do you mind sharing it? I'm having similar issues. Thanks.

Hey Wayne, welcome to the party! There are a lot of great folks here. Probably one the the best forums on the internet, period.

I did not pursue this so I can't answer for it. I was looking to KM to move files for me as updating to Catalina broke Hazel which was my go to for moving files. Not long after this question, Hazel was fixed for Catalina and I just went back to it.

I had the thought that I'd simplify my setup by using KM for all my filing needs and get rid of Hazel but Hazel is so easy and good that it doesn't make sense to reinvent that wheel using KM.

There are some coding wizards here that could probably do it using code to extend what KM has internally but I'm a coding baby and not interested enough to invest learning beyond my immediate needs tho I have poked at it a bit cause learning is so damn great too!

Hazel is excellent for moving files and has (like KM) a smallish learning curve to get it up and running.

Might I ask what you're looking to accomplish?

1 Like

Hey, thanks!

As far as what I’m trying to accomplish, I just want anything that lands in my Downloads Folder to move to my Desktop.

Thanks,

Wayne

Is there a reason using the Desktop for downloads instead of the Downloads folder isn't feasible?

In a word, simplify. IF (big if perhaps) you keep both Desktop and Downloads folders empty and not use them as folders to store stuff but rather as temporary work spaces, then why have two places to look? I have Hazel move everything that lands in the Downloads folder to the Desktop so I can forget about the Downloads folder altogether. One less drawer to junk up AND it boxes me in to getting stuff filed.

As a job will fill the time allowed, files will fill the space given.

Of course everyone has their own thinking/organizing/working/flow so this will not work for everyone.

My 2₵

The latter action will fail if the file already exists.

I understand what you're saying. I do similar, sending all downloads to a volume mounted using the memory card slot on my Macs. What I'm wondering is, why have Hazel move the files from one place (Downloads) to another (Desktop) when a desired location for downloads can be specified within apps? Clearly, what you're doing works, it just seems unnecessary to add in another app to achieve the end result.

Thanks, Peter. I think I've set it up as you describe, but I'm still getting an error. Please see attached screenshots. Screen Shot 2020-04-06 at 6.57.00 AM Screen Shot 2020-04-06 at 6.58.03 AM

Simple, I never thought about it. Once I had Hazel I set it up and didn't look back.

I know Safari can target downloads to the Desktop. Aren't their other apps that target the Downloads folder and aren't there other ways things get there? I never thought through it. I just realized one day that my data was scattered around, started consolidating and found the Desktop to be the only place I couldn't eliminate so worked to eliminate everything else.

Hazel also makes available eliminating Mail's duplicate file structure by dragging all my email to the Desktop (using KM, natch). There Hazel files a great deal of it into my primary filing system (Finder files). What Hazel doesn't file gets addressed by keeping the Desktop cleared and Finder tagging and Calendaring what needs attention.

I find the exercise of developing a taxonomy a great practice to develop my thinking.

1 Like

What version of Keyboard Maestro are you using?

The documentation says:

The %TriggerValue% text token contains the path of the file that was added or removed (prior to 7.1 this was only the file name, not the full path).

I presume you are using a newer version than 7.1.

Yes, I’m using Version 9.0.5.

Thanks,

Wayne

Add a Display Text action and display the %TriggerValue% in a window and see what it looks like.

Peter,

I’m not sure I understand what adding a Display Text action will accomplish? Is it just a test of some sort? If you don’t mind spelling it out a bit more, I’d appreciate your help.

Thanks,

Wayne

image

It will show you what the trigger value is when you the macro is triggered. Yes, it is just a test to see what is going on.

Peter,

Strange, but now the macro seems to work… I drop a file named “Take it Easy” in the Downloads folder and after about three seconds, it gets moved to the Desktop and the Display Text shows:

Not sure why the three second delay.

Nor why it seems to work now, but hey…

Thanks,

Wayne

Screen Shot 2020-04-09 at 6.31.09 AM.png

There is generally a delay while Keyboard Maestro makes sure the file is not still being downloaded.

You can change the trigger to trigger all changes immediately if appropriate.

Thanks again, Peter, for all your help.

Wayne