Go Back   MacRumors Forums > Apple Systems and Services > OS X

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 26, 2007, 10:49 PM   #1
lancestraz
macrumors 6502a
 
lancestraz's Avatar
 
Join Date: Nov 2005
Location: RI
Add a "Delete All" item to the downloads stack

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 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.
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.
Attached Files
File Type: zip DeleteAllNew.zip (35.9 KB, 2108 views)

Last edited by lancestraz; May 19, 2008 at 10:08 PM. Reason: Updated features and now only 108 KB!
lancestraz is offline   0 Reply With Quote
Old Oct 26, 2007, 10:51 PM   #2
tony710
macrumors member
 
Join Date: Jul 2007
Location: ~/
Awesome idea, and it works great!
tony710 is offline   0 Reply With Quote
Old Oct 27, 2007, 12:07 AM   #3
haiggy
macrumors 65816
 
Join Date: Aug 2003
Location: Ontario, Canada
Great idea, and good job.
I hope Apple adds this functionality built in.. but for now yours is just fine.
__________________
15.4" MacBook Pro 2.6GHz Core 2 Duo; 4GB RAM; 160 GB HDD; NVIDIA 8600GT 256MB; Red iPod Nano, 16GB iPod touch

Last edited by haiggy; Oct 27, 2007 at 12:32 AM.
haiggy is offline   0 Reply With Quote
Old Oct 27, 2007, 12:41 AM   #4
orbitalpunk
macrumors regular
 
Join Date: Aug 2006
holy shiat, your awsome
orbitalpunk is offline   0 Reply With Quote
Old Oct 27, 2007, 01:27 AM   #5
Deerhunter04
macrumors member
 
Join Date: Aug 2006
Location: Illinois
Thanks! This rocks.
__________________
2.66 Mac Pro | 1.5TB | 6GB Ram | Radeon 3870 | Dell 24" | OS X 10.6.4
Final Cut Studio | Logic Studio | Adobe CS3
Deerhunter04 is offline   0 Reply With Quote
Old Nov 8, 2007, 10:40 AM   #6
nikiski
macrumors regular
 
Join Date: Oct 2007
Location: Hong Kong, or Surrey, BC, Canada
A very, very nice idea. Thanks
nikiski is offline   0 Reply With Quote
Old Nov 10, 2007, 03:40 AM   #7
Learjet035
macrumors 6502
 
Join Date: Feb 2005
Location: S. Floriduh
You RULE!
Thanks!!!!
Learjet035 is offline   0 Reply With Quote
Old Apr 4, 2008, 11:37 PM   #8
stellarceltic
macrumors member
 
Join Date: Oct 2007
Quote:
Originally Posted by lancestraz View Post
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.
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:

Quote:
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 is offline   0 Reply With Quote
Old Apr 6, 2008, 03:21 PM   #9
stellarceltic
macrumors member
 
Join Date: Oct 2007
Anyone? It seems like there's a simple solution but I don't know the first thing about scripts...
stellarceltic is offline   0 Reply With Quote
Old Apr 6, 2008, 03:25 PM   #10
cheekybobcat
macrumors 6502a
 
Join Date: Dec 2007
Location: U-S of A
This is awesome! Great idea. You should pitch it to Steve
__________________
OS X Snow Leopard 10.6.5 15" MacBook Pro 500GB 2.66 GHz
OS X Tiger 10.4.11 G4 PowerMac 80GB 867MHz
cheekybobcat is offline   0 Reply With Quote
Old Apr 6, 2008, 03:31 PM   #11
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Quote:
Originally Posted by stellarceltic View Post
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"

Quote:
Originally Posted by cheekybobcat View Post
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).
__________________
Actually it does make sense. Man created god, so if we exist, He exists. - obeygiant
Eraserhead is online now   0 Reply With Quote
Old Apr 6, 2008, 03:32 PM   #12
MacDawg
macrumors P6
 
MacDawg's Avatar
 
Join Date: Mar 2004
Location: "Between the Hedges"
Quote:
Originally Posted by Eraserhead View Post
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
MacDawg is offline   0 Reply With Quote
Old Apr 6, 2008, 03:43 PM   #13
lancestraz
Thread Starter
macrumors 6502a
 
lancestraz's Avatar
 
Join Date: Nov 2005
Location: RI
Quote:
Originally Posted by stellarceltic View Post
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.

Last edited by lancestraz; Apr 7, 2008 at 07:32 PM.
lancestraz is offline   0 Reply With Quote
Old Apr 6, 2008, 04:40 PM   #14
bluedoggiant
macrumors 68020
 
bluedoggiant's Avatar
 
Join Date: Jul 2007
Location: MD & ATL,GA
Quote:
Originally Posted by lancestraz View Post
Try this one.
Link.
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:

Code:
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
__________________

Haswell MacBook Pro 15" - 16GB - 2.3GHz - 512GB - dGPU
Mid-2007 iMac 24" - 4GB - 2.8GHz - .5TB
Gold 64GB iPhone 5s
bluedoggiant is offline   0 Reply With Quote
Old Apr 6, 2008, 04:47 PM   #15
techlover828
macrumors 68020
 
techlover828's Avatar
 
Join Date: Jun 2007
awesome!!! thanks for saving lots of time, your the man
techlover828 is offline   0 Reply With Quote
Old Apr 6, 2008, 05:03 PM   #16
karenflower
macrumors 6502a
 
karenflower's Avatar
 
Join Date: Dec 2007
Thanks for the script, it works great!
karenflower is offline   0 Reply With Quote
Old Apr 6, 2008, 06:38 PM   #17
lancestraz
Thread Starter
macrumors 6502a
 
lancestraz's Avatar
 
Join Date: Nov 2005
Location: RI
Quote:
Originally Posted by bluedoggiant View Post
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.

Quote:
Originally Posted by bluedoggiant View Post
lmao, i showed the application contents, then resources, then scripts, i read your script, and it said:

Code:
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.
lancestraz is offline   0 Reply With Quote
Old Apr 6, 2008, 06:52 PM   #18
bluedoggiant
macrumors 68020
 
bluedoggiant's Avatar
 
Join Date: Jul 2007
Location: MD & ATL,GA
Quote:
Originally Posted by lancestraz View Post
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!"
__________________

Haswell MacBook Pro 15" - 16GB - 2.3GHz - 512GB - dGPU
Mid-2007 iMac 24" - 4GB - 2.8GHz - .5TB
Gold 64GB iPhone 5s
bluedoggiant is offline   0 Reply With Quote
Old Apr 6, 2008, 06:56 PM   #19
xUKHCx
Administrator emeritus
 
xUKHCx's Avatar
 
Join Date: Jan 2006
Location: The Kop
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

Quote:
set the_items to (every item of (parent of (path to me as alias)) whose name is not "Delete All.app")
xUKHCx is offline   0 Reply With Quote
Old Apr 6, 2008, 08:40 PM   #20
techlover828
macrumors 68020
 
techlover828's Avatar
 
Join Date: Jun 2007
Quote:
Originally Posted by bluedoggiant View Post
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!"
i don't get it
techlover828 is offline   0 Reply With Quote
Old Apr 6, 2008, 11:53 PM   #21
lancestraz
Thread Starter
macrumors 6502a
 
lancestraz's Avatar
 
Join Date: Nov 2005
Location: RI
Quote:
Originally Posted by bluedoggiant View Post
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!"
You want to see the error message?

Quote:
Originally Posted by xUKHCx View Post
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.

Last edited by lancestraz; May 19, 2008 at 09:28 PM.
lancestraz is offline   0 Reply With Quote
Old Apr 7, 2008, 12:05 AM   #22
bluedoggiant
macrumors 68020
 
bluedoggiant's Avatar
 
Join Date: Jul 2007
Location: MD & ATL,GA
Quote:
Originally Posted by techlover828 View Post
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".

Quote:
Originally Posted by bluedoggiant View Post
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:

Code:
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
__________________

Haswell MacBook Pro 15" - 16GB - 2.3GHz - 512GB - dGPU
Mid-2007 iMac 24" - 4GB - 2.8GHz - .5TB
Gold 64GB iPhone 5s
bluedoggiant is offline   0 Reply With Quote
Old Apr 7, 2008, 11:19 AM   #23
kevo0822
macrumors regular
 
Join Date: Jul 2007
Location: New England
Thanks for this!!!
kevo0822 is offline   0 Reply With Quote
Old Apr 7, 2008, 05:25 PM   #24
stellarceltic
macrumors member
 
Join Date: Oct 2007
Quote:
Originally Posted by lancestraz View Post
Try this one.
Link.
stellarceltic is offline   0 Reply With Quote
Old Apr 7, 2008, 07:29 PM   #25
lancestraz
Thread Starter
macrumors 6502a
 
lancestraz's Avatar
 
Join Date: Nov 2005
Location: RI
Quote:
Originally Posted by stellarceltic View Post
I just downloaded it and got the same thing. It must have got corrupted somehow.
Use the download link in the OP.

Last edited by lancestraz; May 19, 2008 at 09:29 PM.
lancestraz is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
"The operation cannot be completed because the original item for "HD" cannot be found disasterdrone OS X Mavericks (10.9) 0 Jan 24, 2014 02:45 PM
"can't delete backup item" macmesser Mac OS X 10.7 Lion 0 Dec 20, 2013 02:26 PM
"Applications" menu command - "item cannot be found" - owner/permissions? (10.6.8) MacOSExustio OS X 2 Jul 20, 2013 06:05 AM
Mouse cursor goes to "up arrow" when clicking a stack or launchpad? IhatemyMac Mac Basics and Help 1 Nov 18, 2012 07:30 AM
URGENT: can I "add a line" and "buy full price" at APPLE store? Bossyman iPhone 0 Sep 21, 2012 09:26 AM

Forum Jump

All times are GMT -5. The time now is 12:01 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC