Home » 2014 » February » 5 » How do we use FTP from command line to send and receive files

5:24 PM
How do we use FTP from command line to send and receive files
FTP is protocol used to send and receive files from an FTP server or a remote computer.
 
Using this tool, one can send , receive single or multiple files, can write or open to a local or remote file, create or delete a directory on a remote server/computer.

To establish an FTP connection to a remote computer or a FTP server we have to use below command in windows command prompt:
 
ftp ftpserver
The ftpserver here could  be ftp server to connect to or ip address of remote computer.This command prompts for a username and password.
 
If one has an account to remote computer, you have to enter the username and then password. Some FTP server also provides anonymous access. Eg. ftp://ftp.hq.nasa.gov/ 
 
 For that, when it prompts for username, enter "anonymous" and for password, enter email-id.
 
Once the credentials are fed properly, a connection is established and ftp returns a prompt.
 
C:\Users\shanky>ftp shankys.ucoz.com
Connected to shankys.ucoz.com.
220---------- Welcome to Pure-FTPd ----------
220-You are user number 5 of 100 allowed.
220-Local time is now 21:24. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 15 minutes of inactivity.
User (shankys.ucoz.com:(none)): dshankys
331 User dshankys OK. Password required
Password:
230-User dshankys has group access to:  1002
230-OK. Current restricted directory is /
230-581 files used (2%) - authorized: 25600 files
230 343763 Kbytes used (82%) - authorized: 417792 Kb
ftp>

 
Now you can start using ftp features. Here type "help" and press "Enter".
You will get a list of command that can be used inside ftp prompt.
ftp>help

ftp> help
Commands may be abbreviated.  Commands are:
!               delete          literal         prompt          send
?               debug           ls              put             status
append          dir             mdelete         pwd             trace
ascii           disconnect      mdir            quit            type
bell            get             mget            quote           user
binary glob mkdir recv verbose
bye             hash            mls             remotehelp
cd              help            mput            rename
close           lcd             open            rmdir
 
Now, use dir commad to list all the files and directory in the current commad.
You can navigate to another directory using "cd" command.
 
  • To get a file from remote server
To get a file from the current directory at remote server to the current directory of your local system, use below command:
 get <filename>
The file will be copied from the remote computer to the current directory of local system.
 
  • To send a file to remote computer
To send a file from your current directory to remote computer, use below command:
put <filename>
Note:- Any time if you get a messaage like "Not connected", that means the connection is not established to the remote computer or it is lost. You need to re-connect in this case.
 
 
 

Category: Technical Solution | Views: 1387 | Added by: shanky | Rating: 0.0/0

Related blogs


You may also like to see:


[2014-01-08][Technical Solution]
How to shutdown a computer using your Mobile
[2014-02-06][Technical Solution]
Simple steps to boost your computer.
[2014-11-28][Technical Solution]
Problem Step Recorder(PSR). How to use it?
[2014-03-09][Technical Solution]
Creating a webcam in Visual basic Programming
[2014-07-13][Technical Solution]
Create an online megastore in your website by adding a shopping cart(eSHOP)

Total comments: 0
ComForm">
avatar