DOS FTP

The DOS ftp client accomplishes the same task as the Windows-based Rapid Filer. The DOS ftp client transfers files from a remote computer to your PC drive or from your PC drive to a remote computer. As with Rapid Filer, the DOS ftp requires a networked computer with LAN WorkPlace for DOS installed. The Windows95 ftp client through an MS-DOS prompt works much the same as the LAN WorkPlace for DOS ftp client. The DOS ftp client is not as easy to use as Rapid Filer.

Important Terms/Commands

binary - switch file transfer mode to binary for binary files. Binary files are files that contain software code other than text. A spreadsheet or WordPerfect file are binary files.

ascii - switch file transfer mode to text (default mode). A text file contains just text. A WordPerfect file saved as a DOS text file is a text file.

get - copy a file from a remote computer to your PC disk.

put - copy a file from your PC disk to a remote computer

cd - change directory - change the current directory on the remote host to a new directory

lcd - local change directory - change the current directory on your local computer (your PC drive) to a new directory.

pwd - show current working directory on the remote host

lpwd - show current working directory of your PC drive

dir - list contents of remote directory

ldir - list contents of local PC directory

quit - close the ftp connection

dir -l - see a list of files

rename oldfile newfile - rename files within ftp

delete filename - to delete files within ftp

mput *.* - uploads all files within the present directory. Just answer 'y' or 'n' to select files. Saves typing.

mput *.html - uploads all files that end with .html.

mput *.jpg - uploads all files that end with .jpg ...and so on with the mput command.

help - view a list of additional ftp commands)

Examples

is the RETURN or ENTER key

Sending a File from Your PC Drive to a UNIX Remote Computer

Step One - Change the current directory on your PC hard drive to the directory where the file you wish to send is located. While it is possible to send files from your A or B drive, it is a good idea to send them from your C drive because reading and writing files is normally quicker from that drive.

C:\>cd windows

C:\WINDOWS>

Step Two - Start the ftp session by entering ftp from your DOS prompt followed by the name of the remote computer (hostname) that you wish to send your file to. In the case below, I am connecting to the panther computer at GSU.

The remote panther computer will respond with the Remote User Name prompt and then Remote Password:. You will need a userid and password on the remote computer to connect. There are many anonymous ftp sites that let you use "anonymous" as your userid and your e-mail address as a password. See the handout on Anonymous FTP.

C:\WINDOWS>ftp advantecon.net

Remote User Name:

Remote Password:

ftp>

Step Three - Once you have entered your userid and password, you will see the ftp> prompt. This means that you have successfully connected to the remote computer. Your remote computer and PC are effectively linked together. It is a good idea to ascertain your current working directories on both the remote computer and your PC drive. Use the pwd command for the remote computer and the lpwd command for your local PC drive.

ftp> pwd

"/gsu/hcs/hcsdar" is current directory.

ftp> lpwd

"c:\windows" is current directory.

ftp>

In the case above my current working directory is my home or personal directory on the remote panther host. Whenever you connect to a remote UNIX computer and logon, your current working directory is always your home or personal directory where disk space is allocated to you. The current working directory on my local PC drive is c:\windows. Notice that, in Step Two, the c:\windows directory was the current directory where I entered the ftp command.

Step Four - Let's assume that I am satisfied with my current working directories. I want to send a file called monet.bmp which is located in my c:\windows directory to my home or personal directory on the panther remote host. I could have used the cd command to change the current working directory on panther or the lcd command to change the current working directory on my PC hard drive as shown below:

ftp> cd /tmp

ftp> pwd

"/tmp" is current directory.

ftp> lcd \temp

ftp> lpwd

"c:\temp" is current directory.

ftp>

Step Five - The file I want to send (monet.bmp) is a binary file. It's actually a reproduction of a Monet painting in bmp or bit-mapped format. Knowing this, I set my binary switch. I can use the status command to confirm that the current transfer status is binary.

ftp> binary

ftp> status

Connection-independent Flags:

Transfer files according to current transfer parameter settings.
Print transfer statistics.
Prompt during m[ultiple] commands.
Client specifies data connection port.
Connected to panther
Current transfer type is image (binary).
Current transfer format is nonprint.
Current file structure is unstructured (file).
Current transfer mode is stream.
ftp>
Step Six - I can use the put command to copy the monet.bmp file from my PC hard drive to my home or personal directory on my UNIX panther account.

ftp> put monet.bmp

294294 bytes transmitted in 4 seconds (73573 bytes/s) ftp>

Step Seven - The file is now transferred. 294294 bytes were transferred. It is a good idea to check that the size of the file on your PC hard disk corresponds to the same file that now also resides on your panther personal or home directory.

ftp> dir *.bmp

-rw-r--r-- 1 hcsdar hcs 294294 May 22 16:35 monet.bmp

ftp> ldir *.bmp

monet.bmp 294294 12-08-94 8:22 A

1 File(s)

ftp>

You can use wild cards such as the asterick * to narrow your search to certain files with both the dir and ldir commands.

Sending a File from a UNIX Remote Computer to Your PC Drive

Follow Step One through Step Five above.

For Step Six, instead of using the command put, use the command get. Follow Step Seven above.