How to access a file on a remote computer

Kay C Lan lan.kc.macmail at
Sun Jan 18 06:39:10 EST 2015


that had me confused and I looked a little deeper. It appears that
I've just been lucky in the simple URL way I've been accessing files
across my LAN - this is as tested on OS X 10.9.5.

The URL method I posted earlier, and the open file for read methods do
NOT seem to work unless the actual network folder the file resides in
is mounted on your system - i.e. the Eject symbol needs to present not
just the server and or folder icon visible. After a quick test the
simplest way I've found within LC to mount the network folder/file and
get the exact path name is to use - answer folder/file

answer file "Choose a file:"  --navigate to a network TEXT file to test
put "file:" & it into tFilePath
put URL tFilePath into msg

For ages I've been using LC to 'do as AppleScript' to tell BBEdit to
open a network file. I've then been using the 'put URL xxxx into tVar'
and 'put tContent into URL xxxx' without a hiccup. I didn't realise
that LC needed the file to be mounted first and BBEdit was doing it
automatically for me.

Does anyone know if there is a command to force OS X to mount a folder
that you have appropriate access rights to? I can think of a million
reasons why you would want to bypass the 'answer folder/file' step. It
would be nice if either the  put URL, or open file methods
automatically mounted the folder, or a 'mount fiolder' command that
acted like a faceless 'answer folder'; you gave it a folder path and
it mounted just like answer folder/file is doing now but without the
dialog box.

If no one knows of a faceless way to mount a folder on OS X I can put
in an enhancement request.

Do those on Win and Linux have automatic mounting of network
folders/files or is this a problem on those platforms as well?

Oh and one last thing. One MAJOR difference between the URL method and
the open file for read method. If you use open file for read, whilst
ever it is open if you try and unmount the server/folder, i.e. click
on the Eject icon, you will get a System warning telling you "The disk
xxxxx couldn't be ejected because LiveCode is using it". With the URL
method it is possible to Eject the server/folder without any warning
so may unwittingly stop your stack from doing what it's suppose to.

I think I better go back and change my URL method to open file for read.

More information about the Use-livecode mailing list