Jump to content

Throw all your downloads with only one shortcut


Recommended Posts

Hi there,

 

If you are, like me, downloading lots of files (images, pdf, videos...) to your downloads folder but only use them once and then let them, you are probably quite angry each time you have to clean your Downloads folder ! That' why I've just created the Trash Downloads workflow that will allow you to clean this folder with nothing more than a shortcut !

 

This workflow is pretty simple : when you execute the action in Alfred, it will move all files in your Downloads folder to the trash. There is no selection of the files it will move, so make sure you have no important file that you want to keep before using this workflow. 

 

How to install ?

 

Well, as usual you just click the download button at the end of this topic and then you double-click on the file that have been downloaded. This will import the workflow right in Alfred, and then you can immediately use it to clean your Downloads folder from the .alfredworkflow file that will be useless !!

 

How to use ?

 

This is pretty straightforward, as you would expect you have a keyword that will execute the action. Simply display Alfred and tap "throw", you will then have 2 options:

- Press "Enter", this is the basic option that will move all the files in the Downloads folder to the trash.

- Press "cmd+Enter", this option will do the same as the first one but will also empty the trash in the same action. Be careful while using this one because it will permanently delete the files contained in the Downloads folder and the files that were in the trash, and this can't be undone !

 

Direct download link

Packal link

 

If you have any question or suggestion, feel free to answer this topic.

 

Cheers,

Axel

Edited by AxelPeigne
Link to comment
  • 1 year later...

@AxelPeigne. Great workflow.

 

Is there a way to modify the folder? 

For example, if I would like to set it to ~/Downloads/ToBeDeleted folder?

 

Thanks !

 

It is not a feature I thought about, but I guess you could directly change the folder in the script file. The easiest way to achieve this would be to select the workflow in Alfred Preferences and double click on both "Run script" Actions. You could then replace this piece of code (on line 2)

(path to downloads folder as text)

to the path of the desired folder. I didn't test it, but it should work !

 

I will think about this and inform you (on this topic) if I do implement this kind of feature.

 

Thanks again for your feedback,

Axel

Link to comment

Hum, I guess the problem is related to the path of your folder.

 

I tested it and here is the correct line of code you'd need to paste if your folder is located in the Downloads folder :

set allDownloads to every item of folder "ToBeDeleted" of folder (path to downloads folder as text)

And if your folder is not in the Downloads folder (in this example it is located on the Desktop), you could achieve the deletion with that line of code :

set allDownloads to every item of folder "ToBeDeleted" of folder "Desktop" of folder "your_username" of folder "Users" of startup disk

Is this working for you ?

Link to comment

It is working very well. Thank you.

 

Would love to see something like this:

I type "throw" in Alfred's bar, then one keyword I would have previously defined, then hit enter. 

(The keyword represent the path of a folder).

 

After hitting enter, All/Some the Files/Folders of the aforementioned folder would be moved to the trash/deleted. 

 

Could be very powerful  :) Just a thought.

Link to comment

Well, I am curious and love to improve my creations so I quickly developed a new version that should fulfill your request !

 

Tap "throw" like before and if you want to choose a specific folder, just add a space after that and choose the folder where is located the files to be deleted. The "cmd" shortcut will also work to permanently delete the files if you wish. Please note that this can be pretty dangerous as you could delete all the content of important folders without any warning...

 

Here is a beta version, that I quickly tested : https://www.dropbox.com/s/n88h1ja6dy6mqtw/Trash%20Downloads.alfredworkflow?dl=0 ;)

Edited by AxelPeigne
Link to comment

Without the cdm key any file is moved to the Trash. Great.

 

The cmd modifier key doesn't do what is says.

With the cmd key the Downloads/Trash should be emptied and they aren't.

My test file is just moved from Downloads to Trash.

 

Didn't test the workflow with throw a particular folder in the Trash.

Link to comment

@politicus: It's working now. Based on Packal's caching and the filenames that the workflow author uses, sometimes the download link will break temporarily. If it doesn't work at the moment, then it should be working within a few hours. If it is on Packal and it really does seem to be broken, then email me, and I'll fix it.

Link to comment
  • 5 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...