$doctitle = "Trick: Deleting Sets of Files Quickly"; $authname = "Lance Leonard"; $versions = "Applies to: Windows 95/98 and others"; $postdate = "20 July 2000"; // 1=About, 2=Paradox, 3=Delphi, 4=Assorted, 5=Webtricks $pagearea = 4; $navlinks = 'Assorted'; $metakeys = "windows deleting file set quickly "; $metadesc = "Describes how to quickly delete sets of files in multiple directories"; ?> include( $DOCUMENT_ROOT . "/lib/pageinit.php" ); ?>
Answer: You betcha! Use the Find command from your Start Menu. Consider the following, which assumes you want to delete *.bak files stored on your C: drive:
1. From your Start menu, choose Find. This displays the Find Files dialog.
2. In the Named box, enter:
*.bak
3. In the Look In edit box, type:
c:\
4. Make sure the Include Subfolders box is checked.
5. Choose Find Now. Windows now locates and displays a list of all matching files. Wait for the search to complete.
6. When the search is finished, choose Edit | Select All.
7. Press the <Delete> key and confirm the dialog when prompted.
Windows now deletes all selected files.
Notes:
1. Microsoft has changed the names of the contents of the Find Files dialog in recent versions of Windows. While this article was written for Windows 95, the technique works fine in later versions.
2. You can include multiple drives in the Look in edit box. For example, to search Drives C: and D:, change Look In to:
c:\;d:\
3. Use multiple selection techniques, e.g. Shift+Click and Ctrl+Click to remove specific files from the list.
4. Once you've run the search at least once, you can save a shortcut for it to your Desktop by choosing File | Save Search.
5. You can also use this trick to change the file attributes of a set of files or to determine the amount of space required for a set of Files by choosing Properties from the right+click shortcut menu after Step #6.
include( $DOCUMENT_ROOT . "/lib/pagecomp.php" ); ?>