How Do I Transfer Files to a FTP Server?

Updated Dec 12, 2017

Reported In

Other

Primary Software: LabVIEW Real-Time Module
Primary Software Version: 2009 SP1 or Later

Issue Details

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

Solution

There are a number of parameters that are necessary to know when connecting to a 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 four basic ways to communicate with an FTP server.

Use a Windows Explorer Window

​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.  

Use a web browser as your FTP client

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 ftp://ftp.ni.com 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 ftp.ni.com 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.  

Use the command-prompt FTP client

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.   

Use a graphical FTP client

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.

WAS THIS ARTICLE HELPFUL?

Not Helpful