open for access question
open for access question
- Subject: open for access question
- From: Carl Albrecht-Buehler <email@hidden>
- Date: Fri, 02 May 2003 17:24:20 -0500
Hi again everyone
Sorry to bother you with this, but I'm a little confused about how to
properly access files. Right now I have the following script:
set theFIle to (choose file)
open for access theFile
set fileContents to (read the file from 25 before return)
close access theFile
This works for me, but now I would like to hard code a path name instead of
using "choose file". I've tried a number of different iterations in order
to try to get a specific file to open with 'open for access' and I always
get errors:
if i open for access ((path to startup disk as Unicode text) &
"Folder:Subfolder:Text.txt" I get a Duplicate file name error
if I set theFile to ((path to startup disk as Unicode text) &
"Folder:Subfolder:Text.txt"
if I set theFile to "startup disk:Folder:Subfolder:Text.txt" I get a 'File
wasn't found error with the open for access highlighted.
Can someone please enlighten me to the correct procedure to get a specific
file from a hard code path and then open it for access?
Thanks,
Carl
_______________________________________________
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.