Re: Opening and reading a text file
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
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