Intermedia.NET - About us
Intermedia.NET - Web and E-mail Hosting Company

Customer login

Call sales toll-free at 800-379-7729

Practical Command-Line FTP

These instructions are intended for users who already have a basic feel for FTP. You can get a basic feel for FTP here.

Table of contents:
Creating a new directory
Renaming files
Moving around on your local machine
Transferring multiple files
Deleting multiple files
Deleting a directory
Basic troubleshooting and status changes
Help Functions


CREATING A NEW DIRECTORY:
You can create a new directory by using the MKDIR command. MKDIR stands for Make Directory.


RENAMING FILES:
To rename a file, you should use the RENAME function. You can use the rename function in two ways. The most common way is to type "RENAME CURRENT.NAME NEW.NAME". This will rename a file called current.name, and the new name will be new.name.

The other way to use the RENAME function is to type "RENAME CURRENT.NAME", then enter the new file name, NEW.NAME, at the "to name" prompt.


MOVING AROUND ON YOUR LOCAL MACHINE:
You can use LCD to change directories on your local machine. LCD stands for Local Directory. This changes the directory you are uploading from (SENDing from) and downloading to (GETting to).

Sometimes, you will be unsure of the directory you want to change to or the file you want to upload. When this occurs, you can type the ! command to go to a DOS shell. Once you have gotten whatever information you needed to get, you can go back to the FTP prompt by typing EXIT.


TRANSFERRING MULTIPLE FILES:
You can actually send and receive multiple files, instead of doing it on a one-by-one basis. This is especially useful if you want to transfer the contents of an entire directory (you cannot transfer the folder itself: you need to make the directory, CD to it, and then upload the files to it).
To send multiple files, you need to use the MPUT command. This command enables you to PUT multiple files on the server where your account is located. You should just type in MPUT. When the "Local files" prompt comes up, you should enter all of the files you want to transfer, with a space between each one. You will then need to approve each file by typing "Y" at the prompt.

When the "Local Files" command comes up, you can use "*.*" to denote all files in that directory. This is where the approval of files becomes very useful. If, for instance, you wanted to transfer all files but one, you could transfer them using *.* and then just type "n" when it wanted you to confirm the transfer of that file.

To retrieve multiple files, you need to use the MGET command. This command enables you to GET multiple files from your site on Intermedia. You can just type in MGET. This command is similar to MPUT in terms of usage.


DELETING MULTIPLE FILES:
In addition to sending and receiving multiple files, you can also delete multiple files. Often, you will be unable to delete a directory unless it is empty, so this can be very useful.
One way to use this is to just type MDELETE and then type the file names at the "remote files" prompt. You will then need to approve each file by typing "Y" at the prompt.

You can also type "*.*" at the "remote files" prompt. You can then exclude files by typing "N" (instead of "Y") at the prompt.

In fact, you do not have to delete any of the files you selected.


DELETING A DIRECTORY:
Once the directory you want to delete is empty, you can use the RMDIR command to delete it.


TROUBLESHOOTING:

The most common problem that people have using command line FTP is missing files.
You must be VERY careful when you are transferring files. If you use PUT instead of GET, you will lose the file you were trying to get from your site, even if that file did not exist locally. Similarly, if you use GET instead of PUT, you will lose the file you were trying to send, even if it did not exist on your site. This is very serious, because once you have lost the file, it is impossible to get it back. The most important thing you can do is be careful. There are two other things you can do to prevent losing files.
The first is to have a backup of all of your files (in a separate directory, on a seperate drive, or on a backup tape) which you keep up-to-date.
The second way to prevent the accidental loss of files is to use *.* (instead of the actual file name) whenever possible.

Another common problem that people have using FTP (not just command-line FTP) is that they cannot access files they have uploaded from their web site.
This can be very confusing. The most common cause of this is that you are not uploading your files to the Htdocs directory. When you first FTP to your site, you should see three directories: Htdocs, ftproot, and Database. These three directories are essential to the operation of your site and should not be moved, deleted, or renamed. The Htdocs directory is where you go when you type http://www.domain.name (or http://your.IP.add.ress) in a browser.
To fix this problem, you need to FTP to your site again, switch to the Htdocs directory, and upload your files again.

The third common problem that people have using FTP (not just command-line FTP) occurs when they are transfer a file in the wrong MODE. If you transfer a file and it doesn't seem to work properly, this may be the problem.
When using FTP, there are two modes: binary and ascii. If a file you transferred does not appear to work, you should check what mode you are transferring in, then transfer it again in the opposite mode.
To send files in ascii mode, you need to use the ASCII command.

To send files in binary mode, you need to use the BINARY command.


THE HELP FUNCTION:

Using the ? command brings up a list of the functions offerred on command-line FTP.

If you need additional information about a specific command and what it does, you can use "? [COMMAND]" for a description:


GETTING STARTED: Click here for more basic instructions.