Example Code

Simple Get and Put commands using Windows Command Line FTP Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • LabVIEW

Code and Documents



This VI executes simple Get and Put FTP commands to retrieve a single file from a remote FTP server.



The File Transfer Protocol (FTP) is the standard network protocol used for the transfer of computer files between a client and server on a computer network. This VI creates temporary file ftpcmd.txt. Then it builds the text which is provided into the file that will contain the FTP commands, executes the commands within ftpcmd.txt and finally deletes ftpcmd.txt.



LabVIEW 2012 or compatible


Steps to Implement or Execute Code

      1. Insert Controller IP Address, Remote Path, Remote Filename, and FTP Action

      2. Run the VI


Additional Information or References

VI Block Diagram

Simple Get and Put commands using Windows Command Line FTP LV2012 NI Verified BD.jpg


**This document has been updated to meet the current required format for the NI Code Exchange. **

NI App Software R&D

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Todd S.
NI Employee (retired)

Thanks for posting.  Do you mind changing your attachment to include the LabVIEW version?  "_lvXX.vi" would be fine.

Todd S.
LabVIEW Community Manager
National Instruments
Active Participant
Active Participant

Cleaned it up, made required terminals "Required", and got rid of the enum since I always type define enums and didn't want to pass around a CTL with this VI.  Also, for my app, I wanted to pass in the Remote File Path as a single string input.  Gave you credit on the diagram.  I'll email it your way in case you want to post my version along side yours.

Nice work.

Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.