top of page
Command Prompt FTP
WHAT IS IT?
-
To connect to another computer using FTP at the MS-DOS prompt, command line, or Linux shell type FTP and press Enter.
-
Once in FTP, use the open command to connect to the FTP server, as shown in the example below.
-
In the below example, I entered IP address of where you are connecting. An example would be open 192.168.1.124
-
Once connected, a username and password prompt will appear.
-
Once these credentials have been entered, the server allows you to browse, send, or receive files, depending on your rights.
-
Some servers may also allow anonymous logins using guest or an e-mail address.
FTP Commands
-
Typing -help or a ? will list the commands available to you.
-
Below is a general description of FTP commands available in the Windows command line FTP command.
Connect using FTP
Step 1
-
Before connecting to FTP server, we need to configure an FTP server on our local server.
-
I have already configured an FTP server in IIS (Internet Information Server).
-
You can find here.
-
Open Command Prompt.
-
Type ftp 192.168.0.124
-
Press Enter.
Type this in command prompt (FTP client)
Step 2
-
Enter the username and password of FTP server.
-
Here I configured with an anonymous server.
-
So enter anonymous in User; and email id or leave it blank in Password > Enter.
-
You will be logged in to the server.
User: Anonymous
Password: (none)
Step 3
-
There is another way of connecting to the FTP server.
-
The anonymous connection allows connecting without username and password.
-
Type -n before IP to anonymous which does not ask for password and user id.
-
It has some limitations.
Send and receive a file in FTP:
-
To get files from the server onto your computer.
-
Use the get command as shown in the example below.
-
To send a file, use put command followed by file name.
-
Eg. put Screenshot_4.jpg > Enter.
get command
​
​
​
​
​
put command
-
To get files from the server onto your computer.
-
Use the get command as shown in the example below.
-
To send a file, use put command followed by file name.
-
Eg. put Screenshot_4.jpg > Enter.
Local Computer
FTP Server
get command
​
​
​
​
​
put command
​
​
​
​
​
-
The command for sending or receiving the file over command prompt is case sensitive.
-
Below images shows that the sending of an image file named "Screenshot_4.jgp".
-
We tried with the wrong filename and without file extension, it did not work.
"Put" command for transfer fine to FTP server.
Filename is case sensitive and with file extension.
Screenshot_4.jpg (File name)
FTP file lookup in Command prompt and web browser:
- Use dir command to see the all the files and folders available in the FTP server.
-
To change to the directory use cd "Folder name".
-
The image in left shows the files on FTP server in Command Prompt.
-
And the image in right shows the same files available in same FTP server but access in a browser.
FTP files in Command Prompt
FTP files in Web Browser
-
The default current directory is C:\ in FTP client.
-
To change the local current directory type lcd "Full path".
-
By doing so we can get and send the file between our local directory to FTP server.
lcd "Local Path" : for changing the current local directory.
Change the transfer mode
-
In command prompt the default file transfer mode is ASCII.
-
The files are converted to ascii character and vice versa.
-
To change the medium type binary in command line > use get or set.
-
For better transmission we use binary mode.
for changing the transfer medium form ASCII to BINARY
binary :
Closing the connection:
-
In closing the connection to the FTP server, there are different commands available such as: close/bye/disconnect/exit.
close/bye/dissconnect/exit
To dissconnect FTP server.
-
We can type ftp > enter > open > ip > user id > password to connect FTP server.
-
FTP is not an encrypted transmission, which means any data sent over it, including your username and password, could be read by anyone who may intercept your transmission.
-
If you're wanting a more secure transmission, we suggest using SFTP.
Another way to connect
bottom of page