AxelPeigne Posted May 27, 2013 Share Posted May 27, 2013 (edited) 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 August 25, 2014 by AxelPeigne mixterdee 1 Link to comment
AxelPeigne Posted May 27, 2013 Author Share Posted May 27, 2013 I just slightly changed the workflow to add notifications when the action is done Link to comment
politicus Posted August 18, 2014 Share Posted August 18, 2014 @AxelPeigne. Great workflow. Is there a way to modify the folder? For example, if I would like to set it to ~/Downloads/ToBeDeleted folder? Link to comment
AxelPeigne Posted August 18, 2014 Author Share Posted August 18, 2014 @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
politicus Posted August 18, 2014 Share Posted August 18, 2014 Tested it and ... it doesn't work. Link to comment
AxelPeigne Posted August 18, 2014 Author Share Posted August 18, 2014 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
politicus Posted August 18, 2014 Share Posted August 18, 2014 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
AxelPeigne Posted August 18, 2014 Author Share Posted August 18, 2014 Great ! It is a great idea, I didn't spend time lately on this workflow though so I don't really know if I'll have time to think about that. Anyway, I'll keep you in touch if I create this kind of feature ! Thanks again for your feedback Link to comment
politicus Posted August 18, 2014 Share Posted August 18, 2014 Let's keep in touch. I added a ton of workflows lately. Time to digest now Link to comment
AxelPeigne Posted August 18, 2014 Author Share Posted August 18, 2014 (edited) 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 August 25, 2014 by AxelPeigne Link to comment
politicus Posted August 20, 2014 Share Posted August 20, 2014 Awesome. Even easier than I ask for. As you said deleting files + Alfred'speed + lack of attention can be dangerous. So adding a pop-up "Are you really sure?" could be life-saving... Link to comment
AxelPeigne Posted August 25, 2014 Author Share Posted August 25, 2014 (edited) I'm not a big fan of popups so I was trying to find a better way to do that but all my tests were worse than a popup ! So here is a version with a popup : https://www.dropbox.com/s/q1k283etzpaj55b/Trash%20Downloads%201.3.alfredworkflow?dl=0 What do you think ? Thanks again for your feedback Edited August 25, 2014 by AxelPeigne Link to comment
politicus Posted August 25, 2014 Share Posted August 25, 2014 This is awesome and way more secure I tested it and after clicking on "God no!" there is a notification "Files deleted successfully". Link to comment
AxelPeigne Posted August 25, 2014 Author Share Posted August 25, 2014 Sorry, it was not the correct workflow. This one does not even delete the files ^^. Here is the good one: https://www.dropbox.com/s/q1k283etzpaj55b/Trash%20Downloads%201.3.alfredworkflow?dl=0 Link to comment
politicus Posted August 25, 2014 Share Posted August 25, 2014 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
AxelPeigne Posted August 25, 2014 Author Share Posted August 25, 2014 You're right, here is a fixed version (sorry, I'm lacking coffee !) : https://www.dropbox.com/s/pgbcews3uqwvrch/Trash%20Downloads%201.4.alfredworkflow?dl=0 It should work as expected Link to comment
politicus Posted August 25, 2014 Share Posted August 25, 2014 Works as advertised Awesome. Link to comment
AxelPeigne Posted August 25, 2014 Author Share Posted August 25, 2014 Good. Btw, I've put my workflow in Packal : http://www.packal.org/workflow/trash-downloads Link to comment
politicus Posted August 25, 2014 Share Posted August 25, 2014 (edited) Download link is not working. Edited August 25, 2014 by politicus Link to comment
rice.shawn Posted August 26, 2014 Share Posted August 26, 2014 @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
mixterdee Posted September 2, 2014 Share Posted September 2, 2014 Thanks, very useful. Link to comment
marktripney Posted May 21, 2020 Share Posted May 21, 2020 BLISS! I've wanted this ability for literally years. Thank you! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now