View Full Version : Add a "Delete All" item to the downloads stack
lancestraz
Oct 26, 2007, 09:49 PM
The downloads stack is pretty useful; but it's a pain having to delete the files stored there when you're done with them. I made an AppleScript that does this for you! Just place it in your downloads folder (or any folder) and click it when you want to cleanup.
Update: You can now change the name of this script to whatever you want and it will not delete itself.
For example: some people (http://forums.macrumors.com/showpost.php?p=5456899&postcount=27) add a space to the beginning of the name so it will always appear first in the stack when sorting by name.
You can now place it in any folder and it will still work. thank xUKHCx for this (http://forums.macrumors.com/showpost.php?p=5274370&postcount=19).
If you want to exclude certain files or folders, open this script in "Script Editor.app" and add the name of the item you want to exclude to "items_to_excluded". Don't forget to add a files extension.
tony710
Oct 26, 2007, 09:51 PM
Awesome idea, and it works great!
haiggy
Oct 26, 2007, 11:07 PM
Great idea, and good job.
I hope Apple adds this functionality built in.. but for now yours is just fine.
orbitalpunk
Oct 26, 2007, 11:41 PM
holy shiat, your awsome
Deerhunter04
Oct 27, 2007, 12:27 AM
Thanks! This rocks.
nikiski
Nov 8, 2007, 09:40 AM
A very, very nice idea. Thanks :)
Learjet035
Nov 10, 2007, 02:40 AM
You RULE!
Thanks!!!!
stellarceltic
Apr 4, 2008, 10:37 PM
The downloads stack is pretty useful; but it's a pain having to delete the files stored there when you're done with them. I made an AppleScript that does this for you! Just place it in your downloads folder and click it when you want to cleanup.
Get it here. (http://www.box.net/shared/xoz6yst7dk)
BUMP
I've used this bad boy ever since you released it, and it has been a godsend. One problem though...
I want to put a space in front of the name so that it will always be in the front of my stack. I know I can just set the icon of the stack, but I want to be able to see if there are other things in the downloads folder.
Anyway, when I add space to the name, it deletes itself. I looked at the script and part of it says:
set the_items to (every item of (path to downloads folder as alias) whose name is not "Delete All.app")
I tried just putting a space in the name there and saved it, but it still deletes itself.
Anyone have any ideas?
stellarceltic
Apr 6, 2008, 02:21 PM
Anyone? It seems like there's a simple solution but I don't know the first thing about scripts...
cheekybobcat
Apr 6, 2008, 02:25 PM
This is awesome! Great idea. You should pitch it to Steve :)
Eraserhead
Apr 6, 2008, 02:31 PM
Anyone? It seems like there's a simple solution but I don't know the first thing about scripts...
Change "Delete All.app" to " Delete All.app"
This is awesome! Great idea. You should pitch it to Steve :)
Report it to bugreport.apple.com (ADC members) or apple.com/feedback/ (non ADC members).
MacDawg
Apr 6, 2008, 02:32 PM
Change "Delete All.app" to " Delete All.app"
I think he tried that from reading his post
"I tried just putting a space in the name there and saved it, but it still deletes itself."
Woof, Woof - Dawg http://homepage.mac.com/k.j.vinson/pawprint.gif
lancestraz
Apr 6, 2008, 02:43 PM
BUMP
I've used this bad boy ever since you released it, and it has been a godsend. One problem though...
I want to put a space in front of the name so that it will always be in the front of my stack. I know I can just set the icon of the stack, but I want to be able to see if there are other things in the downloads folder.
Anyway, when I add space to the name, it deletes itself. I looked at the script and part of it says:
I tried just putting a space in the name there and saved it, but it still deletes itself.
Anyone have any ideas?
Try this one.
Link. Link. (http://www.filedropper.com/deleteall_2)
bluedoggiant
Apr 6, 2008, 03:40 PM
Try this one.
Link. (http://www.filedropper.com/deleteall)
I used the icon to the left here:
http://interfacelift.com/icons-mac/details.php?id=1972
thats the icon instead of the downloads stack icon, so i click the empty box to clear my downloads stack.
lmao, i showed the application contents, then resources, then scripts, i read your script, and it said:
try
tell application "Finder"
set the_items to (every item of (path to downloads folder as alias) whose name is not "Delete All.app")
delete the_items
end tell
on error
tell application "Finder" to display dialog "An error occurred!" with icon 0 buttons {"Damn"} default button 1
end try
notice the damn in bold, i got rid of everything in my downloads stack and clicked the app, it didn't display that message, i think you need to get rid of the .ds store files and stuff, ill try again now by showing the hidden files
EDIT: nope, i think there is a problem
techlover828
Apr 6, 2008, 03:47 PM
awesome!!! thanks for saving lots of time, your the man
karenflower
Apr 6, 2008, 04:03 PM
Thanks for the script, it works great! :)
lancestraz
Apr 6, 2008, 05:38 PM
I used the icon to the left here:
http://interfacelift.com/icons-mac/details.php?id=1972
thats the icon instead of the downloads stack icon, so i click the empty box to clear my downloads stack.
Cool icon. When I made the script, the current version of Leopard always displayed the first item in the stack, I used the "Downloads" folder icon so it would look like your download stack was empty when "Delete All.app" was the only item left. Now you can choose if the icon displayed is that of the first item in the stack or the folders icon that is the stack.
lmao, i showed the application contents, then resources, then scripts, i read your script, and it said:
try
tell application "Finder"
set the_items to (every item of (path to downloads folder as alias) whose name is not "Delete All.app")
delete the_items
end tell
on error
tell application "Finder" to display dialog "An error occurred!" with icon 0 buttons {"Damn"} default button 1
end try
notice the damn in bold, i got rid of everything in my downloads stack and clicked the app, it didn't display that message, i think you need to get rid of the .ds store files and stuff, ill try again now by showing the hidden files
EDIT: nope, i think there is a problem
You won't see the error if your "Downloads" folder is empty. You will only see it if there is an error in the execution of the program. Like if the Finder is not running or you don't have sufficient privileges to delete the items.
bluedoggiant
Apr 6, 2008, 05:52 PM
Cool icon. When I made the script, the current version of Leopard always displayed the first item in the stack, I used the "Downloads" folder icon so it would look like your download stack was empty when "Delete All.app" was the only item left. Now you can choose if the icon displayed is that of the first item in the stack or the folders icon that is the stack.
You won't see the error if your "Downloads" folder is empty. You will only see it if there is an error in the execution of the program. Like if the Finder is not running or you don't have sufficient privileges to delete the items.
Ahh, I see, I will have to try that sometime, i can imagine a 8 year old mac geek downloading it and getting that message, "mom, look, i got an error message," mom, "oh dear!"
:rolleyes:
xUKHCx
Apr 6, 2008, 05:56 PM
FYI if you want to make it universal as it folder agnostic so it will delete everything in whatever folder it is in you can use this line in the script
set the_items to (every item of (parent of (path to me as alias)) whose name is not "Delete All.app")
techlover828
Apr 6, 2008, 07:40 PM
Ahh, I see, I will have to try that sometime, i can imagine a 8 year old mac geek downloading it and getting that message, "mom, look, i got an error message," mom, "oh dear!"
:rolleyes:
i don't get it
lancestraz
Apr 6, 2008, 10:53 PM
Ahh, I see, I will have to try that sometime, i can imagine a 8 year old mac geek downloading it and getting that message, "mom, look, i got an error message," mom, "oh dear!"
:rolleyes:
You want to see the error message?
FYI if you want to make it universal as it folder agnostic so it will delete everything in whatever folder it is in you can use this line in the script
Good idea! Using the same general idea I updated the script so you can change it's name too.
bluedoggiant
Apr 6, 2008, 11:05 PM
i don't get it
well if you read my post, i got the script used in his application, when an error happens it says "an error occured" with a button that says "damn".
I used the icon to the left here:
http://interfacelift.com/icons-mac/details.php?id=1972
thats the icon instead of the downloads stack icon, so i click the empty box to clear my downloads stack.
lmao, i showed the application contents, then resources, then scripts, i read your script, and it said:
try
tell application "Finder"
set the_items to (every item of (path to downloads folder as alias) whose name is not "Delete All.app")
delete the_items
end tell
on error
tell application "Finder" to display dialog "An error occurred!" with icon 0 buttons {"Damn"} default button 1
end try
notice the damn in bold, i got rid of everything in my downloads stack and clicked the app, it didn't display that message, i think you need to get rid of the .ds store files and stuff, ill try again now by showing the hidden files
EDIT: nope, i think there is a problem
kevo0822
Apr 7, 2008, 10:19 AM
Thanks for this!!!
stellarceltic
Apr 7, 2008, 04:25 PM
Try this one.
Link. (http://www.filedropper.com/deleteall)
http://img241.imageshack.us/img241/9435/picture1jo9.png
lancestraz
Apr 7, 2008, 06:29 PM
http://img241.imageshack.us/img241/9435/picture1jo9.png
I just downloaded it and got the same thing. It must have got corrupted somehow.
Use the download link in the OP.
Jolly Jimmy
May 19, 2008, 08:37 AM
Hi can someone repost this great little applescript please? I deleted it by mistake and I can't seem to download it any more.
Thanks!
karenflower
May 19, 2008, 09:15 AM
Here's my modified version, I edited it to have a space in front of the file name so that it would stay at the top.
http://www.filedropper.com/deleteallapp
reubs
May 19, 2008, 09:17 AM
I'm not seeing this on the Filedropper site. Do I really have to sign up with Paypal to download the app that the OP uploaded?
EDIT: Looks like it got reposted as I was looking for it.
Thanks!
Jolly Jimmy
May 19, 2008, 12:46 PM
Here's my modified version, I edited it to have a space in front of the file name so that it would stay at the top.
http://www.filedropper.com/deleteallapp
Working great,
Thank you!
sOwL
May 19, 2008, 12:57 PM
great idea, but i always keep my downloads :P
jpmittins
Oct 7, 2008, 03:16 PM
Sorry to bump an old thread, but I have my downloads stack set a different way. I have the little bins on each of my stacks that are made by copying an icon on a generic folder's icon. Is there a way to make this always appear at the end of my stack (like if I change the name to have a number in the beginning of it)? Then again, is there a sort of name that would always cause it to appear as the last item? NOTE: I have my stacks organized alphabetically, not by date modified.
techlover828
Oct 7, 2008, 03:34 PM
so you want like this?
http://mt12.quickshareit.com/share/picture292f88.png
http://mt15.quickshareit.com/share/picture3114c5.png
or no?
jpmittins
Oct 7, 2008, 03:39 PM
so you want like this?
http://mt12.quickshareit.com/share/picture292f88.png
http://mt15.quickshareit.com/share/picture3114c5.png
or no?
Yes! How did you do that? As long as the items in your stacks are ordered name.
EDIT: You just had a space in front of the Download placeholder folder (hooray! That rhymes!), didn't you? No, my Downloads stack looks like this (ordered by name):
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.