WinTidy - Identify and Remove Unwanted Files WinTidy helps you control disk space usage. There are many programs that generate backup files that can be safely deleted once a project has been completed, and program developers may wish to delete those "intermediate" files and pre-compiled headers that typically clutter up C++ or Delphi projects. WinTidy identifies these files, and will allow you to try and delete them. It does *not* delete the files automatically, unless a special command-line option is explicitly set. ========================== WARNING ============================== You accept any resonsibility for deleting files on your system. Take a backup if you are at all uncertain what you are doing! ========================== WARNING ============================== Usage: Extract WinTidy.exe from the zip file to a convenient location, and run it! You need no other files from the .ZIP, they are provided for your interest. WinTidy uses no other DLLs. Press the Find button to search for unwanted files. WinTidy normally scans all locally-connected hard disks. You can select or unselect individual drives in the Select Drives list box. You can also choose a common sub-directory tree to scan across all selected hard disks by entering a directory specification in the Directory Mask. In this way you can scan, say, all the directories called \TEMP on every drive. Leaving the mask as its default "\" scans the entire drive. Optionally, if you make an icon or shortcut for WinTidy, you can have one parameter which causes the directory mask to be preset to that parameter. The files are presented in a list box in size order, so you can concentrate on removing the largest files first. Maximum results for minimum effort! Select the files you want to delete in the list box, and then press the Delete button. Normally, for safety, WinTidy will not actually delete files, but instead will move them to the Recycle Bin. This means that the disk space will not actually be returned until the Recycle Bin is emptied. In the options dialog, the pre-version 2.1 behaviour (to use Borland's Erase function) can be restored. If you become completely happy with the operation of WinTidy and wish to completely automate directory searching and file deletion, it is possible to use a second command-line parameter which must be exactly "-auto_delete". There are two further command-line parameters which allow you to specify a command separated list of files either to be kept, or to be deleted, for example: -keep=C:\cache\*.htm,"D:\safe files\*.*" -delete=E:\temp\*.gif,"C:\unsafe files\*.*" Note that file specifications with embedded spaces must be in double quotes. Command Line Parameters for WinTidy: WinTidy [-auto_delete] [-keep=] [-delete=] where is a directory specification without a disk drive e.g. \Windows\Temp must be the first parameter [-auto_delete] must be the second parameter are one or more comma separated wildcard file specifications e.g. C:\cache\*.htm,"D:\safe files\*.*" Note that the disk specification IS required. multiple "-keep=" and "-delete=" parameters are allowed. I don't know what the maximum length of a command line under Windows 95 and Windows NT 4 actually is! What files are "unwanted"? As supplied, the program regards the following files as unwanted. To change this requires editing the registry entries: HKEY_CURRENT_USER\Software\David J Taylor\Windows Tidy\FilesToFind HKEY_CURRENT_USER\Software\David J Taylor\Windows Tidy\ExtraFilesToFind *.tmp ~*.* *.~* *.?~? *.aps *.bak *.bk? *.bsc *.dmp *.dsm *.ilk *.pch *.rws *.sbr *.$$$ backup*.wbk There is also an option to be rather more agressive in selecting files, when you are getting really desparate for space. This seeks out Windows 95 and NT help file searching add-ons, the .FTS and .GID files. These can be recreated by Windows when required. See the Options, What-to-find menu to change this choice. By default, WinTidy ignores files that have the hidden, read-only or system attributes set, or have zero size. This is primarily a safety measure since such files are often required by Windows. Use the Options, Ignore menu to alter this behaviour. To recover even more disk space, you may also want to empty the cache of any Web browsers you have, particularly if you have one installed which is no longer in use. If you run both Windows 95 and NT, you might want to delete NT's PAGEFILE.SYS in 95's autoexec.bat, and 95's WIN386.SWP in NT's autoexec.nt. Notes: The program is written with Borland's Delphi 2.01, and full source is included. You do not need access to Delphi 2.01 to run WinTidy, which runs on Windows 95 and Windows NT 4.0. Release information: 1996 Apr 16 V2.0.2 First Freeware released version 1996 Sep 19 V2.0.4 Update btnSelectAllClick to use more efficient method 1997 Mar 16 V2.1.0 Add option to ignore ReadOnly, Hidden and System files Add option to ingore zero-length files Add multiple drive search Add -auto_delete 2nd command-line parameter Save options in the registry By default, use the Recycle Bin for deleting files Contacting the author: This program is Freeware, but remains copyright of David Taylor, Edinburgh, 1996-1997. This program is provided "as is", without any support. Whilst I cannot answer queries relating to the use of this program, I'd welcome any comments or suggestions for improvements you may have. david.taylor@gecm.com david_j_taylor@compuserve.com 1997 March 16