How to Upload and Download with FTP

How to Upload and Download with FTP? | Tutorial

FTP (File Transfer Protocol) is a file transfer protocol that is used to download and upload files. Essentially, it is one of the easiest ways way to transfer files. Additionally, there are other applications used for file transfers on Linux and windows like vsFTPd, proFTPd for Linux, FileZilla Server for windows.

There are a number of ways to connect to an FTP server such as free tools sourced from the internet. Although other third party tools can be used, in this tutorial we will keep it basic and stick with the command line terminal. This article will show you to how to connect to the FTP server using the command line and Download and Upload Files using FTP protocol between the FTP server local system.

Although FTP is very popular, it is also not a secure protocol. We recommend using SFTP for transferring files over an encrypted channel.

1. Connect to FTP Server via Command Line

To connect to any FTP server from windows open its command prompt and for Linux open terminal window. Now you have required IP or Hostname of FTP server and login credentials to connect with a specific user.

c:\> ftp ftp.example.com

2. Upload Single File to FTP Server

To upload file on FTP server use put command from FTP prompt. First, navigate to the desired directory on the FTP server where to upload a file and use the following command. It will upload local system file c:\files\file1.txt to uploads directory on FTP server.

ftp> cd uploads
ftp> put c:\files\file1.txt

3. Download A Single File from FTP

To download the file from FTP server, we use get command. Using that command we can download one time at a time. To download any file from FTP server First login to your FTP server, navigate to the directory and use the following command to download

ftp> get file1.txt

4. Upload Multiple Files to FTP

To upload multiple files to FTP server use mput command. You can also specify wildcard characters to upload multiple files to the server at a time. First, navigate to the desired directory on the FTP server where to upload a file and use the following command. It will upload local system files with .txt extension in c:files directory to uploads directory on FTP server.

ftp> cd uploads
ftp> lcd c:\\files

ftp> put *.txt

5. Download Multiple Files from FTP

To download multiple files from FTP server, we use mget command. Using that command we can download more than one file at a time. To download multiple files specify wildcard character for specifying directory name do download all files from the directory.

ftp> mget *.txt

Similar Posts