Using tsNet for sftp directory file listing

Richard Gaskin ambassador at fourthworld.com
Tue Nov 1 14:31:06 EDT 2016


Skip Kimpel wrote:

 > On 29/10/2016 7:52 AM, Richard Gaskin wrote:
 >>
 >> It's been a while since I've used FTP, but IIRC in previous versions
 >> you could just use "get" on a directory and it'll return the file
 >> list (note that the trailing "/" is important to let libURL know
 >> it's dealing with a directory):
 >>
 >>   get url "ftp://name:pass@server/folder/"
 >>
 >
 > I am still struggling putting this code together correctly.  Does
 > anybody have any working examples of downloading a single file, via
 > sftp protocol?

The example I gave earlier was for your request to obtain a list of files.

To download a single file it should be as easy as just using the full 
path to the file on the server, and changing "ftp" to "sftp":

   get url ("sftp://name:password@server/folder/file.dat")


-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list