New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

applescript - delete file from root

Post Reply New Thread Subscribe

Thread Tools

Member Since: Jun 08, 2007
Posts: 43
Jiggy is on a distinguished road

Jiggy is offline
tell application "Finder"
   delete file "Macintosh HD:file.jpg"
end tell
I can use this code to delete a file from the root of my startup disc, which by default is called 'Macintosh HD'. But if I want to share this applescript app to other users and they happen to have a different name for 'Macintosh HD' how do I script it that it looks for the file in the root of their self renamed harddrive? No matter ware the app is placed?

Is there some code like 'delete file "_root: file.jpg" which would do that?
QUOTE Thanks

Post Reply New Thread Subscribe

« I have no "apple" menu icon | MacBook Pro VERY slow after failed bootcamp attempt »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting 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
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
Can't delete an alias file on my External HDD ziggo OS X - Operating System 5 03-23-2010 07:31 PM
Permantly delete log file? roisin20 Apple Desktops 1 11-04-2009 07:56 AM
Just How Secure Are the 'Reset Safari' & 'Erase Free Space' Facility? scoot OS X - Operating System 3 05-30-2007 05:28 PM
i can't delete file from desktop lamarck Schweb's Lounge 12 07-13-2006 12:42 PM
can't delete a file from a DVD RW peterg OS X - Operating System 1 06-11-2005 08:29 PM

All times are GMT -4. The time now is 02:52 AM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?