Wordpress & Web Development

A Beginner’s FTP Command Tutorial For Ascii or Binary File Transfers

Varun Kashyap 27-07-2009

A Beginner's FTP Command Tutorial For Ascii or Binary File Transfers ftpguidelogoFTP stands for File Transfer Protocol. It is a simple and secure way to exchange files over the Internet. There are two players involved in any FTP transfer – the server or the site which is hosting the files and the client which contacts the server and requests to transfer a file. You can either use your browser or you can download a specific software to run as a FTP client.


What you will need:

  • The address of the FTP server you wish to communicate with. This can be an IP address or a domain name.
  • The login credentials for a FTP account on the server (you don’t need this for anonymous or public FTP).
  • An FTP client.

Assuming you know the address and the login credentials, let’s straight away hop over to the FTP client. As I mentioned before you can either use your browser as a client or use dedicated FTP software. If you want to download the occasional file or two from FTP sites you are good to do so with a browser, just type in the address of the file and make sure you use ftp:// instead of the usual http://.

If on the other hand you are managing a site or required to constantly upload/download files and manage accounts on the server you should use a FTP client designed for the task. Here are your choices:

  • Most operating systems have a built in command line FTP client with which you would have to get familiar with the commands.
  • You can also use one of the GUI FTP clients: Firefox users can try FireFTP, or you can use FileZilla Transfer Files by FTP with FileZilla Read More , built specially with FTP in mind.

It is easier to find your way around the GUI tools. A typical GUI client would have two panes, one showing the remote FTP directory and the other showing directories on your computer. There are buttons representing transfer between the two panes. Browse to the directories you want to transfer to/from like you would do inside Windows Explorer, click on the appropriate transfer button and the client takes care of the rest.

All the commands are issued transparently by the client without requiring you to issue them explicitly. While this may seem easier, it is always handy to know what is going on behind the scenes, which you can by trying out the commands yourself.


A Beginner's FTP Command Tutorial For Ascii or Binary File Transfers filezilla

Let’s touch up the basic FTP commands, shall we?

First and foremost you need to connect to the host. Use ftp to connect to the host. The server would respond with some information including if anonymous access is allowed.  If it isn’t, you will be required to enter a username and password for the FTP account on the server.

Go ahead and enter those details. If you don’t know your username or password, you would have contact the administrator of the site or create a new FTP user (if you are the administrator).


After a successful login you can perform any desired operations on the files. You can always use the help to get a list of available commands or get help on any command as well.

Let us now see how you can perform the basic file operations over FTP:

1. Moving around

A Beginner's FTP Command Tutorial For Ascii or Binary File Transfers loggedin

  • To get a directory listing both ls and dir work.
  • You can change directories using the ubiquitous cd command. e.g. cd www changes to the www directory, To change to a local directory (i.e. a directory on your computer) instead use the lcd command.
  • To know which directory you are currently working in use the pwd (present working directory) command.
  • You can create directories using the mkdir <dir-name> command, remove directory using rmdir <dir-name> .
  • To delete a file use the delete <filename> command, rename files using rename <old-name> <new-name> .

2. Set File Transfer type

  • If you are going to transfer text files (includes txt, html, shell scripts, css files etc) you need to set the file transfer mode to ascii using ascii command.
  • On the other hand if you are going to transfer binary files (like images, pdf, MS office files, compiled code or executables etc) you need to set the file transfer mode to binary using binary command.

3. Transferring files

A Beginner's FTP Command Tutorial For Ascii or Binary File Transfers get

  • To upload files to the server use the put command. e.g. put style.css would upload style.css from your local directory to the remote directory. Not that put doesn’t allow you to use wildcards, use mput instead, if you want to use wildcards.
  • Similarly to download a file you can use the get <filename> or the mget <filenames/wildcards> commands.

A Beginner's FTP Command Tutorial For Ascii or Binary File Transfers byeftp

4. Creating your own FTP server

If you pay a hosting company for server space, they generally have things configured beforehand and some even create accounts for you. You can always use the management panel to create and edit FTP accounts and some settings. You would have to poke around the management panel your hosting company is providing you with.

If you want to create an FTP server on your home network some configuration is needed. Windows user can try the Filezilla server. Its great and simple to use. Linux users have plenty of options out of which vsftpd is pretty straighforward and feature rich.

Once you have configured the server you can access your files from any computer on your home network, using the IP address of the FTP server. If you want to be able to access your server from across the Internet you would require a static IP or perhaps you could look into something like dyndns (which we discussed briefly while configuring remote access to your torrents How to Access your Torrent Client & Download Torrents Remotely Read More ).


That’s it, you have enough knowledge to get you started and help you along whenever working with FTP. Let us know if you use some other tools for similar purposes.

Related topics: FTP, Web Server, Webmaster Tools.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. peter
    July 29, 2009 at 7:32 am

    I have started with FTP transfer with FileZila. Nowadays I have started with new webhosting provider and with this service also started big trouble. Again and again worms find my username and password and trough the FTP client somehow infect my web page. Webhosting provider servis department recommend me to change FTP client, because FileZila using uncrypted transfer for user name and password. So is that true? What should I do to get tranfers and my webpage secure? thx

  2. Pro2col File Transfer Solutions
    July 28, 2009 at 5:22 am

    A very helpful step by step guide through FTP. Keep up the good work.

  3. paul
    July 27, 2009 at 10:31 am

    Nice article about FTP.
    Off topic:
    Why is your site left margin set to 0px?.
    It kind of looks awkward IMO.
    I had to use stylish addon to set the left margin manually using:
    * {
    margin-left:5 px;
    But it takes the whole content to the right and the design still sucks.
    Site layout can change IMO. Just a thought.

    • paul
      July 27, 2009 at 10:50 am

      On second thought, after taking a look at the site's layout,
      #content {
      margin-left: 10px !important;
      sets it about right.

      • stefan
        July 29, 2009 at 9:26 am

        I agree with paul. Your site layout sucks.

  4. NeoTechie
    July 27, 2009 at 9:39 am

    Great tutorial. Having the basics down is the best way to comprehend and master more advanced commands. Thanks

  5. Prasanth Chandra
    July 27, 2009 at 9:25 am

    Cool post. I have written about List of common FTP errors.
    Check it out here..