• 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
Re: Erase the contents of a text file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Erase the contents of a text file?


  • Subject: Re: Erase the contents of a text file?
  • From: Jack Morrison <email@hidden>
  • Date: Tue, 16 Apr 2002 15:21:06 -0600

Charles Heiser wrote:

>Hello,
>Is it possible to erase the contents of a file? If so how?
>
>Some background -
>
>I have a Applscript that is creating a text file which is a REXX
>script, that will get executed later by another app. Now so I don't
>have to trash the old file every time I just want to erase it's
>contents and write the new script contents.
>
>I hope this makes sense.
>
>Thanks,
>
>- Charles
>_______________________________________________
>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.

Charles;

set yourfilename to open for access file thefile with write permission
set eof yourfilename to 0

This will empty the contents of the file.

Jack
--
--------------------------------------------------------------------------
Jack Morrison <email@hidden> Multipurpose Intelligent
http://www.mBase.com Publishing Solutions
P:780-945-4602
F:780-421-8256 mBase...Enjoy the Freedom
--------------------------------------------------------------------------
_______________________________________________
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.

  • Follow-Ups:
    • Re: Erase the contents of a text file?
      • From: Charles Heizer <email@hidden>
References: 
 >Erase the contents of a text file? (From: Charles Heizer <email@hidden>)

  • Prev by Date: Erase the contents of a text file?
  • Next by Date: Re: When a String is not equal to a String
  • Previous by thread: Erase the contents of a text file?
  • Next by thread: Re: Erase the contents of a text file?
  • Index(es):
    • Date
    • Thread