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
Jiggy

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

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

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

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

Welcome to Mac-Forums.com

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?