Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Erasing the Desktop DB file with AppleScript.

Erasing the Desktop DB file with AppleScript.
Thread Tools
travisres
Fresh-Faced Recruit
Join Date: Dec 1999
Location: Lincoln, MA USA
Status: Offline
Reply With Quote
Dec 14, 1999, 08:41 AM
 
Does anybody know how to make an applescripot that will delete the Desktop DB file?
     
RGS
Guest
Status:
Reply With Quote
Dec 14, 1999, 09:37 AM
 
The following "Rebuild Desktop" script was written by Jon Pugh and requires Jon's Commands <http://www.seanet.com/~jonpugh/>

It includes code to delete System 6's "Desktop" file (just in case you're a longtime Mac user and can remember System 6).

Modify the following script as you see necessary:

-- Requires Jon's Commands <http://www.seanet.com/~jonpugh/>

set vols to list disks

repeat with v in vols

-- ignore errors from CDs, Mail Enclosures and more
try
moveFile file (v & " esktop DB") to v & ":Trash" -- Jon's Commands
moveFile file (v & " esktop DF") to v & ":Trash" -- Jon's Commands
on error
end try

-- kill System 6 desktop files too
try
moveFile file (v & " esktop") to v & ":Trash" -- Jon's Commands
on error
end try

end repeat

if (keys pressed) contains "option" then -- Jon's Commands
-- if you prefer to quit (with option key)
tell application "Finder" to quit
else
-- I prefer to restart (no option key)
tell application "Finder" to restart
end if

[This message has been edited by RGS (edited 12-14-1999).]
     
RGS
Guest
Status:
Reply With Quote
Dec 14, 1999, 09:49 AM
 
Note: Replace the "Big Grin" smiley with "colon D" (see "Smilies" http://forums.macnn.com/cgi-bin/faq.html )

Anyone know how to get around the "Smiley" feature?
     
travisres  (op)
Fresh-Faced Recruit
Join Date: Dec 1999
Location: Lincoln, MA USA
Status: Offline
Reply With Quote
Dec 14, 1999, 07:05 PM
 
Cool. Thanks a ton.
     
gene
Dedicated MacNNer
Join Date: Apr 1999
Location: Spanish Fork, UT, USA
Status: Offline
Reply With Quote
Dec 15, 1999, 12:36 AM
 
I have an extension that will do the same and then delete itself. I wonder if make it read only will rebuild desktop every time Mac turns on....
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:24 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,