• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Fwd: Reading/Writing text files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Reading/Writing text files


  • Subject: Fwd: Reading/Writing text files
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 16 Aug 2002 10:05:29 -0700

Begin forwarded message:

From: Michelle Steiner <email@hidden>
Date: Fri Aug 16, 2002 10:01:11 AM America/Phoenix
To: Sara Lewin <email@hidden>
Subject: Re: Reading/Writing text files

set fileID to open for access file "Macintosh HD:folder:filename" with write permission
try
set eof of fileID to 0
write "changed text." to fileID
close access fileID
on error
close access fileID
-- any other error code you wish
end try

--Michelle

On Friday, August 16, 2002, at 09:39 AM, Sara Lewin wrote:

I am trying to open a text file - that may or may not
exist and than erase everything in the file and write
text to it.

I suppose I could delete the file and than create it?
But I am unsure what the code for this would look
like.
We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.


We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Scripting "Startup Disk"
  • Next by Date: Re: [OT] deliminated
  • Previous by thread: Re: Reading/Writing text files
  • Next by thread: OS 10.2 & Mail scripting has introduced a new wrinkle
  • Index(es):
    • Date
    • Thread