How to access a file on a remote computer

Peter Haworth pete at lcsql.com
Sat Jan 17 16:18:10 EST 2015


Looking for some advice on how to access a file on a remote computer. Both
computers in question are on OSX.

I'm getting file locations out of a text file on the local computer that
look like URLs, e.g. "file://localhost/<path to file>"  with spaces
replaced by %20, etc.

Although the URL includes "localhost", the files are actually on another
computer.  If I look at the System Settings Sharing options for the remote
computer, it tells me it can be accessed as "Petes-iMac.local" or as
"afp:petes-imac".

I tried replacing "localhost" with "Petes-iMac.local" in the URL and used
"get URL..." but got "can't open file" in the result.  Also tried
"afp://petes-imac/<pathtofile>" with the same result

I tried libURLDownloadToFile with "file://Petes-imac.local",
file://petes-imac", and "afp://petes-imac"and used the callback message to
check the URLStatus (= error) and libURLErrorData to get the error
(=invalid URL).

The drive and folder containing the files have been set up for sharing on
Petes-iMac and I can see them and open them in the Finder from the other
computer.

Any suggestions on how to make this work?


Thanks,

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>



More information about the use-livecode mailing list