LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to list all the files in a FTP site?

I am now using LV7.1 and trying to list all the files (with file name, file size and modified date) on both a local drive and a remote FTP site. I can manage to do on a local drive, but is it possible to list the files on a FTP site?

Thanks,

Cola
0 Kudos
Message 1 of 4
(3,711 Views)
Listing files on a local drive and listing the contents of an ftp site are two different things. Access to an ftp site uses a totally different protocol. Off the top of my head, you have a few options:
  1. Use a third-party tool that can map an ftp drive to a local drive letter. WebDrive is one such client. Note: I'm assuming Windows here.
  2. Use the Intenet Toolkit.
  3. Use the LabVIEW TCP/IP functions to write up your own ftp client to connect to the server, change to the desired directory, and send the command to list the contents, which you can parse and spit out as a nice little array of filenames. Check the LabVIEW examples, as I believe there's some examples on this. You should also search this board for "ftp client", as this has been brought up before, and samples have been posted.
Message 2 of 4
(3,689 Views)
Also, the Internet Toolkit has a set of FTP functions. There's a shipping example with it called FTP Browser and one of the functions it calls is FTP Directory Listing. The top level example only show file names it but the directory listing function returns size and date as well.
Message 3 of 4
(3,682 Views)

And, if using windows you might be able to use ftp command with a script file and use the System Exec function.

Take a look at this thread to get you started http://forums.ni.com/ni/board/message?board.id=170&message.id=198554

David

Message 4 of 4
(3,667 Views)