Home > Tutorials > Know Your Server > Doing More with FTP

Doing more with FTP

It is all very well being able to use FTP to log into the server, but there are things you can do to make it easier and quicker to use. As you may already be aware, my favorite FTP program is WS_FTP LE, so it should come as no surprise that the techniques described here are specific to the program. However, most of these options should be available in your preferred FTP program, so it might be worth making yourself more familiar with it.

General options

Although I code my sites by hand rather than using a WYSIWYG editor, I stopped using Notepad after I discovered Textpad over 3 years ago. Notepad just doesn't have the features that I've come to take for granted, I like to see my code in colors that make it easy to distinguish the code from the content and to have a clip library to insert code at the press of a button... so I've set up WS_FTP LE to use Textpad as my default text editor. To change yours, edit the "Text Viewer" option within the "General" tab of the options window.

I don't know about you, but I don't need to keep logs of my own FTP activity as my host keeps FTP logs on their server in a place where I can access them if I need them. The default log setting in WS_FTP LE can be somewhat annoying, particularly if you have a lot of folders and upload to your site frequently. The problem is not the logs as such, but that a new log file is created in every folder you upload to, it is easy to forget that they are there and upload them to your site unnecessarily. For this reason, I tend to switch off logging by leaving the "Enable Logging" box unchecked.

Automatic file detection

Sometimes it can be difficult to remember to upload files in the right mode, was it meant to be uploaded in ASCII or binary format? Thankfully WS_FTP LE has an option that will automatically detect the type of file and upload it in the format of your choice. Make sure to list all the file types you want to upload in ASCII in the "Extensions" tab of the Options window and have "auto detect" checked on your transfer window.

Customising your FTP sessions

WS_FTP LE uses profiles to store the information for different FTP logons, and the basic install comes with some pre-configured profiles which allow you to connect to some FTP sites (bear in mind that many of these are likely to be out of date given the age of the program). When you connect to a new server for the first time, you are required to set up a profile for that particular connection but it is not necessary to provide more than the details required for connecting to the server.

You can save yourself a little time and aggravation by filling out some of the details in the "Startup" tab of the "Session Properties" window. The most obvious time saver is setting the local and remote initial folders for each of your session profiles, as this reduces the need to navigate to the folders before beginning to transfer the files.

If you have a large site or perform different tasks when you log in to the server then it might be an idea to set up different sessions for each task. For example, sometimes you might want to log in to upload your site and other times you might just want to download your log files. You could create an upload profile that sets your default directories to the ones you are likely to want when uploading your files, and have another one set up for your logs that opens the directories you need to download your logs.

It is also possible to store a set of default filters (or masks) in your FTP session profiles that can show or hide files displayed on both sides of the connection. This can prove useful if you want to work on files that are normally hidden from view or of a certain type. You can see files that would normally be hidden on the server side by adding the Unix command -a in the "Remote File Mask" field.

Working with hidden files

Have you ever experienced problems when trying to delete an entire directory from your web site? Some of the free versions of FTP software will not delete a folder on the server unless it is empty, which sometimes makes it necessary to work through each folder and manually delete all the files and subfolders it contains. However, sometimes you might have trouble deleting the folder on your server even though the folder appears to be empty. When this happens, the chances are that there is one or more hidden files in the directory, which you will need to be able to see before you can delete them.

We can get the server to show the hidden files by sending the flag to list everything in the directory, only then is it possible to select and delete any hidden files that are left in the directory. Hidden files are often related to server configuration and are best left alone unless you know what they are used for or have put them there yourself. .htaccess and .htpasswd are two of the most common hidden files you are likely to come across, particularly if your site is hosted on an Apache server.

Perhaps the best way to edit hidden files is to keep a copy of them with the local copy of your site, editing them locally and uploading them rather than trying to edit them directly on the server. Files that require a . to hide them are best kept locally under another name (I would recommend using htaccess.txt and htpasswd.txt for the .htaccess and .htpasswd files respectively).

The most important thing to remember when working with files that are hidden on the server is that they will disappear when the FTP software does not specifically request the full list of files. Thus, they may appear to disappear when you rename them or upload them to your server.


Noticed a problem or got a question or comment?


This site will look much better in a browser that supports web standards, but it is still accessible to any browser or Internet device.


About this Page

Author: Rosemarie Wise
Originally Published: Tue 23rd Dec, 2003
URL: http://websiteowner.info/tutorials/server/ftptips.asp

Want to use this tutorial on your own site? Learn more...


The Web Site Owner's Resource © 2000-2007 Rosemarie Wise