Network Services

Wednesday, April 23, 2014

Uploading Files



Uploading Files
To upload a file to an FTP server, you must have rights on that server. These rights are assigned on a directory-by-directory basis. To upload a file, log in and then follow these steps:

1. At the ftp command prompt, type lcd to navigate to the directory     on the local machine where the file resides.
2. Type cd to navigate to the destination directory.
3. Set the file type to ASCII or binary.
4. Use the put command to upload the file.


The syntax of the put command is as follows:

ftp>put local file destination file

For example, if you want to upload a file that is called 1.txt on the local server but you want it to be called my.txt on the destination server, use the following command:

ftp>put 1.txt my.txt

You’ll see the following response:

200 PORT command successful.
150 Opening BINARY mode data connection for collwin.zip
226 Transfer complete.

743622 bytes sent in 0.55 seconds (1352.04 Kbytes/sec)

TIP:
You can upload multiple files using the mput command. Simply type mput, a space, and then a wildcard that specifies the files. For example, to upload all the text files in a directory, type mput *.txt.

When you’re finished with the ftp utility, simply type quit to return to the command prompt.



0 comments:

Post a Comment