MACSCRPT Archives

December 2008

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
john darnell <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 19 Dec 2008 13:37:44 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (35 lines)
Arrrgh!

Basic stuff!
Sorry...

> -----Original Message-----
> From: Macintosh Scripting Systems
> [mailto:[log in to unmask]] On Behalf Of Jon Pugh
> Sent: Friday, December 19, 2008 12:08 PM
> To: [log in to unmask]
> Subject: Re: FW: Deleting a file
> 
> At 12:00 PM -0600 12/19/08, john darnell wrote:
> >I am trying to write a simple script to delete a file.  The script
> looks
> >like this:
> >
> >set firstfile to "Macintosh
> HD:Users:PRG03:Library:Preferences:Suitcase
> >Preferences:FontTrackingFile"
> >if file firstfile exists then
> >	set myresult to delete firstfile
> >end if
> 
> tell application "Finder"
>   set myFile to file "Macintosh
> HD:Users:PRG03:Library:Preferences:Suitcase
> Preferences:FontTrackingFile"
>   delete myFile
> end tell
> 
> The Finder manages files, not AppleScript itself.
> 
> Jon

ATOM RSS1 RSS2