<HTML><FONT FACE=arial,helvetica><FONT COLOR="#000000" FACE="Geneva" FAMILY="SANSSERIF" SIZE="2">Ken, Tom,<BR>
<BR>
I'm not sure this is as complete as it needs to be- the permission bits in characters 2 through 10 consist of 3 groups of permissions: 3 chars for the owner of the file, 3 for the group, and 3 for all others. On a multi-user MacOS X system, for example, you would find that each user's desktop is writable by the owner, but looks read-only to anyone else. In that case, looking for a "w" anywhere in the permissions would give the false impression that other users' desktop are writable by you.<BR>
<BR>
You can get the owner of the file, the group, and the permissions from the "detailed files" listing.<BR>
<BR>
Using the original "ls" command, you could try starting with something like this if you are on OS X or UNIX systems:<BR>
<BR>
put shell("ls -ld"&&fileOrFolderPath) into theInfo<BR>
put word 1 of theInfo into thePermissions<BR>
put word 2 of theInfo into fOwner<BR>
put word 3 of theInfo into fGroup<BR>
put word 1 of shell("who am i") into thisUser<BR>
...<BR>
<BR>
Getting back to the original question... it seems the quickest way to determine if you can write to a directory may simply be to do this:<BR>
<BR>
open file (someDirectory&"/myfiletest")<BR>
if (there is a file (someDirectory&"/myfiletest")) then<BR>
   put TRUE into isWritable<BR>
   close file (someDirectory&"/myfiletest")<BR>
   delete file (someDirectory&"/myfiletest")<BR>
else<BR>
   put FALSE into isWritable<BR>
end if<BR>
<BR>
Hopefully some of that helps!<BR>
<BR>
<BLOCKQUOTE CITE STYLE="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px" TYPE="CITE"></FONT><FONT COLOR="#000000" FACE="Geneva" FAMILY="SANSSERIF" SIZE="2">function IsReadOnly pWhat<BR>
  -- Go to the home folder, then the Desktop<BR>
  -- folder inside, then get a listing<BR>
  put shell("cd ~;cd desktop;ls -l") into temp<BR>
  put lineOffset(space & pWhat &cr,temp) into tLine<BR>
  put char 2 to 10 of word 1 of tLine into tAccessModes<BR>
  return ("w" is in tAccessModes)<BR>
end IsReadOnly<BR>
</BLOCKQUOTE></FONT><FONT COLOR="#000000" FACE="Geneva" FAMILY="SANSSERIF" SIZE="2"><BR>
<BR>
<BR>
<BR>
<BR>
<BR>
------------------------------<BR>
Brian Yennie<BR>
Chief Technology Officer<BR>
QLD Learning, LLC<BR>
www.QLDLearning.com<BR>
<BR>
PH: (904)-997-0212<BR>
EMAIL: Yennie@aol.com<BR>
-------------------------------<BR>
</FONT><FONT COLOR="#000000" FACE="Geneva" FAMILY="SANSSERIF" SIZE="2"></FONT></HTML>