Most Popular Question: How do I get rid of the confirmation for mgetting and mputting?
It's simple. Just type in "prompt" before you start transferring and you are done. That saves you from hours of pressing enter. Smart or what?
FTP Commands - What they do and how to use them effectivelyASCII:Every FTP client can transfer files in two modes: ASCII and BINARY. ASCII is for text and html files. Images should never be transferred in ASCII mode .Secure documents, such as .htaccess and .htpasswd should be transferred in ASCII mode
BINARY:The second ftp transfer mode. It is more powerful than ASCII, because both text/html files and images, can be transferred correctly with it. Only secure documents, such as .htaccess and .htpasswd should be transferred in ASCII.
BYE:Terminates the current connection.
CD:Changes the remote directory.
CLOSE:Terminates the current connection.
DELETE:Deletes the remote file you specify.
DIR:Shows the contents of the current remote directory, with several details, such as the date of their creation, their size and their chmod status. If you type dir yourfilename.html, it will only show this file. If you type dir a*,it will show all the files beginning with a. If you type a*.jpg, it will show all the .jpg files that begin with a. As you can understand, the asterisk is identified by the ftp client as "whatever".
DISCONNECT:Terminates the current connection.
GET:Enables you to download a remote file from the current remote directory, to your current local directory.
HASH:This is a useful command, when you want to see the transfer process. When you turn hash on, it will say:
hash mark printing on ftp:(x bytes/hash mark)It will show up a certain number of bytes in the place of x. he hash mark is this symbol (#).If you see that when transferring a file there are no hashmarks and you have hash enabled, then your request might have timed out or stopped for some weird reason. Some times, though, it's just the server being slow.
HELP:Displays the commands on the screen for your reference(without any explanation). The same thing can be done by typing a question mark (?).
LCD:Changes the local directory to the directory of your choice. You must type in the full path, for example lcd C:\website\docs. I've found out that Windows FTP has some problems with directory names that contain spaces, so avoid them if possible.
MDELETE:Enables you to delete multiple remote files.
MGET:Enables you to get multiple remote files and transfer them to your local directory
MKDIR:Enables you to create a new remote directory. You won't automatically switch to the newly made directory though.
MPUT:Enables you to put multiple local files form your local directory to your current remote directory.
OPEN:The first step to connect to a remote server with your ftp client.
PROMPT:Or Interactive mode. By default it is turned on and each time you want to transfer or delete multiple files, you will be asked: mdele/mput/mget filename.html?(press enter or y for yes, n for no).That can be annoying if you want to transfer a whole directory or such, so you should turn it off in that case. To turn it on again, just type prompt for another time.
PUT:Enables you to upload a local file from your local directory to the current remote directory.
PWD:Shows your current remote directory.
QUIT:Terminates the current connection.
RENAME:Enables you to rename a remote file.
RMDIR:Enables you to rename a remote directory.
USER:When you connect to an ftp server, you are automatically asked for your username and password. If for some reason the login fails for you, you can type user. That way you'll be asked for your username and password again.
TIP: If you want to transfer a whole remote or local directory, just switch to it and type: mget/mput *.* .If you want to download/upload only certain file types, for example, only gifs, type in: mget/mput *.gif. You get the idea. That's the reason FTP can save you from wasting time on typing in filenames. You should disable interactive mode before trying to download/upload though(type in "prompt"), because if you don't, the program will ask you for confirmation before downloading/uploading each file.
Back to Part 1: What is FTP and how to connect to a server
This article has two parts
PART 1:
What is FTP and how to connect to a server
PART 2:
FTP Commands - What they do and how to use them effectively
Feel like this tutorial is not helping you? Then buy a more detailed FTP Guide from Amazon.com!
|