Log in to FTP upload and download data using the cmd command line method

Source: Internet
Author: User
Tags website ip

Some users in the FTP tool login space upload download process often encounter a variety of problems, such as active mode, passive mode, and other causes can not log in FTP, upload data, download data problems, this time may wish to use the command line method. The command line avoids many problems caused by the FTP tool configuration, and the rate of downloading data in this way is significantly faster than using FTP tools. Here's a look at how to use the FTP command to upload and download data in a simple way.
1. Log in to FTP
Enter "cmd" in "Start", "Run", enter cmd command line mode, then enter: FTP 118.193.22.151
Enter your own website IP address, you will be prompted to enter the FTP user name: [email protected] Domain name, and then enter the password, login successful will prompt user logged in

2. View a list of all files under the current FTP space
Input command: Dir can list file and folder lists and disk quota limits to 200MB under the current space

3. Uploading Files
Upload files 1.txt, 2.txt, 3.txt under the D:test folder to the Htdocs directory under space.
Because the current directory is not necessarily in the d:test, so first switch to D:test, using the command: LCD d:test, you can switch the current working directory to d:test, use the command!dir to see what files are currently d:test, you can see 1.txt, 2.txt , 3.txt; Enter the command pwd, view the current FTP directory, if not htdocs, you need to use the command CD htdocs to switch into the directory, and then use the put command to upload the 3 files separately:







To upload all files ending in. txt under D:test to Htdocs, you can use the Mput command:
Ftp> prompt to turn off interactive mode
Ftp> mput *.txt



4. Download the file and download the file or folder under space to your local
Ftp> Get 1.txt





Download multiple files or folders to the local computer
ftp> mget * Download all files and folders to local
ftp> mget *.txt download files ending in. txt to local

5. Delete the FTP space file or directory
ftp> Delete 1.txt: Delete file 1.txt
ftp> mdelete *.txt Delete all files ending in. txt under space
ftp> mdelete * Delete all Files


To delete a directory, you can use the RmDir directory name to delete the directory, provided that the directory must be empty, that is, there are no files or subdirectories in the directory. If you need to delete a non-empty directory, you need to delete the files before deleting the directory:
Ftp> CD ABC entry directory ABC
ftp> mdelete * Delete all files in this directory
Ftp> CD. Switch to the previous level of the directory
ftp> rmdir ABC Delete empty directory ABC

Log in to FTP upload and download data using the cmd command line method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.