From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Download directory content from FTP

Solved!
Go to solution

Hi
I'm workin on a LabVIEW application which need to interface with an FTP server to get and to put files.
Moreover, i need to download the entire content of a given directory. This directory is defined by user, so it's name and it's content are not fixed.


For example, this directory can contain several files and/or several sub-directories (which can contain several files and/or several sub-directories, etc.).


Is there a VI in Labview or through the LVTN which can do this operation?
Or need i to develop it myself?

 

 

Thanks.

 

0 Kudos
Message 1 of 8
(5,077 Views)

Hi,

 

You might find some answers in thoses documents.

http://www.ni.com/example/29269/en/

 

http://digital.ni.com/public.nsf/allkb/3D985C3C08C12D0B862574BB005A7684

 

Have a nice day.

Adrien

Adrien M.
Certified LabVIEW Developer
National Instruments France


Travaux Pratiques d'initiation à LabVIEW et à la mesure

Du 2 au 23 octobre, partout en France


0 Kudos
Message 2 of 8
(5,025 Views)

FTP Directory Listing and FTP Get Multiple Files should get you what you want.

0 Kudos
Message 3 of 8
(5,012 Views)

@Mancho00

Not exactly.

FTP Listing Vi  lists only the files and directory in the current directory. Maybe i'm wrong, but it is not recursive.

 

 

@adrienmngr

Your function seems to work.

But, if i can, i prefer to not use system exec.

0 Kudos
Message 4 of 8
(5,001 Views)

@mhed wrote:

@Mancho00

Not exactly.

FTP Listing Vi  lists only the files and directory in the current directory. Maybe i'm wrong, but it is not recursive.

 


That's true.  Since you can get directory information, you can recurse it yourself.

0 Kudos
Message 5 of 8
(4,994 Views)

Of course, i'd the same idea.

Howerver, for me it is hard to believe that no one before me had to do this type of operation in their project.

Or maybe there is, but no one publish his solution.

0 Kudos
Message 6 of 8
(4,986 Views)
Solution
Accepted by topic author mhed

@mhed wrote:

Of course, i'd the same idea.

Howerver, for me it is hard to believe that no one before me had to do this type of operation in their project.

Or maybe there is, but no one publish his solution.


I'm positive many have done it.  I've done it myself, though not in LabVIEW.  There's nothing particularly novel about this feature such that a code example is needed.  If you know how to do recursion (for which there are many examples), and you know how the FTP functions work, it shouldn't be much work to get it going.

0 Kudos
Message 7 of 8
(4,980 Views)

Ok.

I'll try this method.

0 Kudos
Message 8 of 8
(4,957 Views)