The following are simple steps and command instructions
Suppose there is a target FTP server, IP: 123.123.123.123, username: ftpname, password: ftppwd. Currently, upload file.doc in the D:\ftpin directory to the target server through the command line. The steps to download from the server are as follows:
-
"Start"-"Run"-enter "FTP" (this is P words)
-
open 123.123.123.123
This step can be combined with the first step, directly enter "ftp 123.123.123.123" in "Run". If your FTP server is not using the default port 21, if the port is 12333, then the command in this step should add 12333 after the space, that is, "open 123.123.123.123 12333"
- ftpname
The command line will prompt you to enter the user name, and the prompts may be different for different OS versions (XP, Vista, Win7)
- ftppwd
You are prompted to enter the password. It will not display or move the cursor during the password input process. Just press Enter after typing the password. If your password is entered incorrectly, you will not be prompted to re-enter it. At this time, you have to type the "user" command, and the third step will appear where you can re-enter your username and password.
- to you
After you successfully log in, you can use the dir view command to view the files and directories in the FTP server, and the ls command can only view files.
- mkdir rsfile
Create an rsfile directory under the root directory on the FTP server.
- cd rsfile
Enter the directory rsfile, and use "cd your directory name" to enter the next level of the current directory, which is the same as DOS.
- bin
Use binary transmission. If you want to upload and download, this step is very important. If you don't execute this command first, upload and download will be slow.
- lcd D:\ftpin
Locate the local default folder. The lcd command here is similar to the cd under the usual command line
- !to you
View files and directories in local folders
- put file.doc
Upload the file file.doc in the current directory (D:\ftpin) to the default directory of the FTP server. You can use "mput . " to upload all files to the FTP server.
- get aaa.jpg
Download the file aaa.jpg in the default directory of the FTP server to the current directory (D:\ftpin). You can use "mget . " to download all files to D:\ftpin*/
- delete
Delete all files in the directory ftpin.
- cd
Return to the upper level directory, that is, the root directory. To return to the upper level directory, use "cd …" to note that there is a space in the middle. Use "cd \" to return to the root directory.
- mrdir ftpin
Delete the directory ftpin. Delete the directory, there can be no files and directories in this directory, otherwise it will not be deleted.
- bye
Log out of the FTP server
When uploading and downloading, pay special attention to the current directory of the server and local computer, and the issue of where the file is from. The command to view the current directory of the FTP server is pwd, and you can use the cd command to locate the server's directory. You can use the lcd command to locate the directory of the local computer. The above examples are applied to the most commonly used commands for uploading and downloading using FTP command line mode. You can also use the command "?" to view more commands.