Dos FTP

DOS (Disk Operating System) can be used to ftp files just as well as an ftp client. The only difference being "a lot of typing" - but if you need to ftp files to and fro and you don't have an ftp client installed, follow these easy steps to ftp using DOS.

We shall use the Demon Homepages server as an example of an ftp server.

The first thing you need to do is open a command prompt. There are several ways to do this.

Click on the Start button on the task bar, navigate to Programs and choose MS-DOS Prompt. or click on the Start button, choose run, and type command in the text box and click OK.

If you are using NT, you only need to type cmd and click OK.
See the example above.

Navigate to the directory where your files that you want to transfer are kept.
If you do not have a directory with files ready for ftp, follow the steps below:
Navigate to the root directory by typing cd\ and press return.
Create a directory by typing the command mkdir test and press return.
Navigate to the test directory by typing cd test and press return.
Your screen should now look like the example above.

To see any files within the directory type dir and press return.

Type ftp homepages.demon.co.uk and press return.
This command is in two parts, the ftp command and the address of the ftp server.

Once connected, you will be presented with the welcome messages and policies of the ftp server.

FTP servers require you to log in. Type in your hostname followed by the return key.
Note: some FTP servers will allow you to login as anonymous for the User.
See our Names & Password Conventions guide.

Then type in your login password followed by the return key at the Password: prompt.
Note: On anonymous servers, you can enter your e-mail address as the password.

Once the server has accepted your password, you are logged in and may investigate anywhere on the ftp server where you have permissions. In the event that you try to enter an area without permissions set, you will receive message similar to access denied.

If you are transferring files other than text (e.g. pictures, sound files, executable files), then you will need to set the transfer type to binary. To do this, type bin and press Return at the ftp prompt.
To change back to ASCII mode, type asc and press Return at the ftp prompt.
If you want to see the progress of your downloading/uploading, typing hash and pressing Return at the ftp prompt prints a # mark to the screen during transfers. A hash mark represents 1024 bytes of upload/download data.

pwd will inform you of your present working directory. To change to the directory that you wish to get/put the files to, type cd and then the directory name/path.
For example:
cd myfiles would place you in the myfiles directory.

To upload a file to the ftp server you will need to type put yourfilename.

To download a file from the ftp server you will need to type get yourfilename.

Note: yourfilename is case sensitive. You will need to do this each time you upload or download a file.

The ftp server will display the type of file (binary or ASCII), filename, transfer completion, size and time of transfer taken.

To check to see if the file or files are on the ftp server, type dir or ls to list the files in the current directory. If the files are in a different directory, type cd (directory path) to change to the appropriate directory.

To disconnect from the ftp server, type quit at the prompt.
Always quit quit an ftp server rather that just closing the DOS Command prompt.

To see if the file you requested get yourfilename is downloaded, type dir at the MS-DOS command prompt.

Here is a list of some of the most common DOS FTP commands:

open Opens up an ftp site

cd Changes directory on remote machine

lcd Changes directory on local machine

dir Displays a list of files and folders

put Copies a file from the local to the remote machine

mput Copies multiple files from the local to the remote machine

get Copies a file from the remote to the local machine

mget Copies multiple files from the remote to the local machine

delete Deletes a file

rename Renames a file

mkdir Creates a directory on the remote machine

rmdir Removes a directory on the remote machine

To get a full list of commands in dos ftp just type help and press Return.

Please note:

ความคิดเห็น

บทความที่ได้รับความนิยม