Adobe Dreamweaver tip – cleaning up unused files

Here’s a great tip for Dreamweaver users, ever finish a website design and then not know which files are active and which are not? It happens to me all the time, lots of spare graphics, even some HTML or PHP files that are simply not in use anymore. So how do I clean them out?

Step One – Backup

It may sound silly but the first thing I do is click on the file folder icon under Files and select Reveal in Finderwhich opens the folder on my hard drive. I back this folder up completely but copy and pasting it to my desktop.

Step Two – Recache

Under the Site menu I select Advanced > Recreate Site Cache to make sure I have the most up-to-date data about my site.

Step Three – Web Documents

Now here’s where Dreamweaver gets sexy. In your File list, simple start selecting files that you think are suspect and hit the delete key. If they’re linked anywhere in the site, Dreamweaver will warn you that the file is links … and you don’t want to delete it. I do this with whole groups of files to save time, if it doesn’t let me delete them then I know at least one file is still live.

Step Four – Graphics

Once I’ve cleared out the Files list, I move onto images and start doing the same things. If the image is found in a web document, it will warn you before deleting this but an even better way to do it is to use the Copy dependent files option on the original files. This option is seriously cool … set your Remote folder to a new folder on your desktop and then back in the file list, select all your files but not the images folder. Now, upload your website to the remote folder. Dreamweaver will ask you if you want to include dependent files which includes any CSS, JavaScript, rich media or images that are included on the pages. The resulting folder will contain everything you need to upload to a website but none of the junk.

Leave a Reply

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