Jump to content

Fast FTP directory/file listing


Recommended Posts

Hi all is there a way to get a quick directory listing from an ftp path. Tried the FTP VIs in the Internet toolkit and it took around 2 - 3 seconds to return a directory. That seems a little slow.

Using the windows command line, I can speed it up a bit (see attached LV8.5 example), but that is kind of a cheezy/non Native LabVIEW way to do it. Was wondering if there was a way with Datasocket or something else I'm missing.

B

Link to comment

QUOTE (bbean @ Aug 6 2008, 10:06 AM)

Hi all is there a way to get a quick directory listing from an ftp path. Tried the FTP VIs in the Internet toolkit and it took around 2 - 3 seconds to return a directory. That seems a little slow.

B

The FTP toolkit is really showing its age. Lack of documentation, disorganised pallets, lack of good examples etc.

What you can do is make sure the Active? boolean is set to false (I think it tries to open a fresh TCP connection if its false).

The dir listing VI also seems to be writing to property nodes and doing all sorts of parsing (though that shouldn't slow it down too much unless you have very complicated directory structures).

You might try to use the FTP Command.vi (vi.lib\addons\internet\ftp\ftp2.llb\FTP Command.vi) to experiment sending the bare minimum commands to speed it up.

I like your command line trick and it is indeed fast.

Neville.

Link to comment

QUOTE (Neville D @ Aug 6 2008, 06:50 PM)

I just went through a similar issue with using FTP to post test results to an off-site server. I found that Active = FALSE ( or Passive) was indeed much faster from the client for LIST and PUT, but the FTP server admin asked me to use Active for security and port range issues. I included a boolean in my higher level code (and ultimately my INI file) to set this based on the conditions of the deployed environment.

Active FTP vs. Passive FTP, a Definitive Explanation

UPDATE:

Here is an example of what I use. I wanted to be able to test the ability to connect to the FTP server independent of LabVIEW, so I created a wrapper for the function "FTP Put Multiple Files and Buffers.vi" that parses an RFC-1738 FTP URL.

I check for access to the server using the exact same string from IE or FireFox. If it doesn't work from those, then I might have a firewall or proxy problem.

Download File:post-949-1218111686.vi (LV 7.0)

Link to comment

QUOTE (Neville D @ Aug 6 2008, 06:50 PM)

Interesting. Thanks for the tip. I wonder what the command line uses. I guess I could check it out with wireshark. I'm getting a little over 300ms but thats much better than before and acceptable for a user interface.

QUOTE (Phillip Brooks @ Aug 7 2008, 08:21 AM)

Here is an example of what I use. I wanted to be able to test the ability to connect to the FTP server independent of LabVIEW, so I created a wrapper for the function "FTP Put Multiple Files and Buffers.vi"
that parses an RFC-1738 FTP URL.

I can check for access to the server using the exact same string from IE or FireFox. If it doesn't work from those, then I might have a firewall or proxy problem.

(
LV
7.0)

Interesting. I shouldn't have any security issues because its just a local machine going to cRIO. I'll check out your example. Thanks for the link

Link to comment

QUOTE (bbean @ Aug 7 2008, 05:30 AM)

Interesting. Thanks for the tip. I wonder what the command line uses. I guess I could check it out with wireshark. I'm getting a little over 300ms but thats much better than before and acceptable for a user interface.

I forgot to mention I was ftp'ing to a PXI 8187 controller and LV-RT frm a Windows machine, and 100MB/s connection. I have a Gig-E network, but the 8187 only accepts 100MB/s.

And yes I have Filezilla that uses default passive, so I would guess command line uses passive too.

Neville.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.