Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
20 ratings:
 3.60 out of 5   

How Do I Transfer Files with FTP?

Primary Software: LabVIEW Modules>>LabVIEW Real-Time Module
Primary Software Version: 2009 SP1
Primary Software Fixed Version: N/A
Secondary Software: N/A

How do I send files to my LabVIEW Real-Time (RT) controller's FTP server or send files to for support purposes?

There are a number of parameters that are necessary to know when connecting to an FTP server.
  • FTP server name or IP address
  • Port number
  • Username
  • Password
In many cases all you will know is the FTP server name or IP address. This is not a problem because all the other values have a sort of default value that gets used if not specified. The default port number is 21. The default username usually used is anonymous. The default password for the anonymous user is any email address. Some FTP servers will accept even a blank password, others do some basic string parsing to make sure what you entered is in email address format. It is generally recommended that you use your email address for the password.

There are three basic ways to communicate with an FTP server.
  • Use a Windows Explorer window
  • Use a web browser as your FTP client
  • Use the command-prompt FTP client
  • Use a graphical FTP client
Let's look at each of these methods in a little more detail.
  • A simple way to use FTP is through a Windows Explorer window.  To do this, open a Windows Explorer window and type ftp://X.X.X.X where 'X' symbolizes the IP address of the controller. You can then copy and paste files to or from the server.
  • Most web browsers (including Internet Explorer) will work as an FTP client. They are particularly easy to use if your goal is to download something from the FTP server you are connecting to. Depending which browser you are using and even which version you have, uploading and deleting files may or may not be possible. In general, in the URL field of your web browser, type in or click on this link to the National Instruments FTP server. The ftp:// tells your web browser that whatever comes next is an FTP server, and should be connected to via the File Transfer Protocol (FTP) instead of as a web page (HTML). The gets replaced by the name or IP address of the FTP server you need to connect to. When you use this URL, the default port number, username, and password are all used. If you need to connect to an FTP server running on a different port or with a different username or password, the full format for this is ftp://username:password@ftp_server_name:port_number. Once connected, depending on your web browser, use basic Windows operations to access the files. Usually either single- or double-clicking on a file will download it. Doing the same to a folder will open that directory. To upload a file, try dragging and dropping it from your Windows computer into the web browser window. As mentioned, this does work in some web browsers, but in others you may experience problems uploading files. A few other possible causes for uploading errors is that some FTP servers do not allow write access, do not accept files with spaces in the file name, or do not accept files with long file names.
  • Starting with Windows 95, Windows comes with a command-line FTP utility. While not as easy to use as Internet Explorer for some operations, things like uploading files are more reliable using this method. To use this utility, launch a command prompt in Windows and type ftp and hit enter. This utility operates almost identically to the UNIX-based utility of the same name which has been around for many years. If you are unfamiliar with this utility, the most useful command is simply ?. Entering this command and hitting enter will display a list of commands that the command-line FTP client understands. You can then type ? command to display a brief line of help about that command. See the Microsoft Command Line FTP reference page for a list of commands.
  • Windows does not come with a dedicated graphical FTP client program. You would need to download one from the link below. They vary in quality and price, but in general the right graphical FTP client is going to give the most flexibility and control of the FTP server. Because there are so many different graphical FTP clients, we will not go into detail on the operation on any one in particular, but once familiar with the features they are more powerful and easier to use than the command prompt or web browser approaches.

Related Links:
External Link: FileZilla - The free FTP solution
KnowledgeBase 3UJACBE9: FTP Transfer of Files between Host and Real-Time Targets in Measurement & Automation Explorer (MAX)
Knowledgebase 2KM92E5F: Using FTP to Access and Use the External CompactFlash or USB Drive on a Real-Time Controller
Knowledgebase 4P4B654H: How Can I Use LabVIEW to FTP Files to and from My Real-Time Target


Report Date: 09/23/2002
Last Updated: 09/05/2017
Document ID: 2PM9CMEW

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit