• 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: Opening and reading a text file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening and reading a text file


  • Subject: Re: Opening and reading a text file
  • From: Christopher Stone <email@hidden>
  • Date: Tue, 29 Jan 2013 03:40:17 -0600

Hey Ed,

On Jan 29, 2013, at 01:14, Ed Rush <email@hidden> wrote:
Close access not necessary, because you've never opened a file for access to begin with.

Not for write access, no, but I thought I did open it for reading with the "set booksList to read sourceFile" command. Or does that automatically close the file after the reading is done?

That's right.

read alias ((path to documents folder as text) & "BUUF:BUUF Library:BUUF library in OO.txt") as «class utf8»

The data file has some accented letters (such as "Mészkö"), which is why I used the "as Unicode text" clause. Does class "utf8" cover that?

This will produce an -39 error on my machine if the file has NO content.

That's odd.

What happens if you use 'cat' from the Terminal?

What happens if you open it in TextWrangler?

I put that in because I was having trouble with the read..alias business, but ultimately it will be a good thing, so the input or output can exist anywhere. It also averts any problem with me mispunctuating or misspellilng the file path, because I'm selecting actual files.

Reasonable.

--
Best Regards,
Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Opening and reading a text file (From: Ed Rush <email@hidden>)
 >Re: Opening and reading a text file (From: Christopher Stone <email@hidden>)
 >Re: Opening and reading a text file (From: Ed Rush <email@hidden>)

  • Prev by Date: Re: Moving Files in a Folder to Another Folder
  • Next by Date: Re: Opening and reading a text file
  • Previous by thread: Re: Opening and reading a text file
  • Next by thread: Re: Opening and reading a text file
  • Index(es):
    • Date
    • Thread