There is a folder returns 'false' for folder selected with 'answer folder'

Jim Bufalini jim at
Wed Sep 9 14:34:18 EDT 2009

Hi Trevor,

> Another update -
> After further discussions with the customer it turns out that he can
> create folders/files directly within the share.
> On my setup I can't create folders or copy files directly to the
> share, I have to work on a folder inside the share. That behavior is
> probably related to how VMWare set the share up though.
> So it appears that 'there is a folder' is just not seeing shares as
> folders when they should be. I think I'm going to file a bug report.

I think you are dealing with a couple things here. I did remember correctly
that there was a difference between "there is a folder" and "there is a
file" across network shares. So for example, this works where you select a
file like *//computerName/folderName/filename* You will get true:

ON mouseUp pMouseBtnNo
    put empty into fld "fldResult"
    answer file "Select a network file"
    CheckFile it
END mouseUp

ON CheckFile pFile
    put "The selected file is:" && pFile & cr after fld "fldResult"
    put "There is such a file:" && (there is a file pFile) & cr & cr after
fld "fldResult"
END CheckFile

This does not work as expected:

ON mouseUp pMouseBtnNo
    put empty into fld "fldResult"
    answer folder "Select a network folder"
    CheckFolder it
    replace slash WITH backslash in it
    CheckFolder it
END mouseUp

ON CheckFolder pFolder
    put "The selected folder is:" && pFolder & cr after fld "fldResult"
    put "There is such a folder:" && (there is a folder pFolder) & cr & cr
after fld "fldResult"
END CheckFolder

I thought I had gotten it to work before by changing the slash but as you
can see I just tested and it is false in both cases. There is a work around,
I just can't remember it. ;-)

Now as to writing files to a network share. This does work:

ON mouseUp pMouseBtnNo
    put fld "fldResult" into URL ("file:" &
END mouseUp

The reason why it may not be working for you is you need to check the share
property on the shared folder itself and go to Advanced button and then
Permission and make sure it is allowing Full Control. Otherwise you have
only read permissions, which is the default.

Aloha from Hawaii,

Jim Bufalini

More information about the Use-livecode mailing list