When you ve discovered you need to get back a deleted file, immediately run Windows Microsoft Undelete. By default, MS Undelete will display the deleted files in the current directory. If you run Undelete from File Manager, go to the desired directory before starting Undelete. To change directories from within MS Undelete, use the Drive/Dir button to specify a new directory.

MS Undelete shows the deleted files, their condition and recovery prospects, and protection level (e.g., Delete Sentry, Delete Tracking). You can select multiple files to undelete by Ctrl-clicking on each name. Once the file(s) are selected, click on the Undelete button. The file(s) will be undeleted to the same directory.
You can also select multiple files to undelete through the Options menu. Select by Name will select files based on their file specification (e.g., *.INI). Likewise, when multiple files are selected, you can also unselect files based on the filespec. Choose Options, Unselect by Name.
You do have the option of undeleting files to a different drive than the one where the file originally was located (for example, to a floppy). Once a file is selected, choose File, Undelete to. Select the new drive and click [OK].
A special note for Windows for Workgroups users: UNDELETE and WFW's 32-bit File Access are not compatible, since UNDELETE requires low-level disk access. To restore a deleted file, you have to either exit Windows for Workgroups and undelete from DOS, or undelete the file to a drive not set for 32-bit file access. The easiest way to do this is to undelete the file to a floppy disk (assuming it will fit), then copy the file back to the hard disk.
MS Undelete can also find deleted files anywhere on the disk, by filename, file type, or text content. Choose the Find button, or select File, Find Deleted File from the menu. Under File specification enter the filespec (wildcards can be used) of the files to search for. The Containing box will search deleted files for text you enter, and you can specify to ignore case or search only for whole words. The [Groups] button will search for deleted files of a certain type, based on the file association. For example, specifying the Notepad group will search for deleted *.TXT and *.INI files. You can see these extensions if you edit one of the file types displayed.

The Sort button will display the deleted files by Name, Extension, Size, Deletion Date and Time, Modified Date and Time, and Condition. Condition sorts the chances of recovery in this order: Perfect, Excellent, Good, Poor, Destroyed. If you check the Sort files first by directory, the directories are sorted first, then the files within each directory. When unchecked, the directories from which the files were deleted are not displayed in the file list. Remember though that files are undeleted to the directory they were originally in, and if you don t display the directories you might not know where you undeleted the file to!
One last MS Undelete option is Purge Delete Sentry File, under the File menu. This option allows you to delete a deleted file from the \SENTRY directory. You would only use this if you absolutely know that a deleted file will never be recovered; by manually deleting it, you make space in the \SENTRY directory for additional files. Select the Delete Sentry file(s) you want to purge. (Delete Sentry files will always indicate Perfect condition.) Choose Purge Delete Sentry File from the File menu, and the file is gone forever.
To enable delete protection:
UNDELETE /LOAD | /U | /S[drive] ... | /T[drive[-entries]] ...
| /LOAD | Loads the UNDELETE TSR using the default protection method and protected drives indicated in the UNDELETE.INI file. |
| /U | Unloads UNDELETE TSR. |
| /S[drive] | Loads UNDELETE TSR with Delete Sentry protection. If a drive is specified, it is added to the list of drives protected. |
| /T[drive] | Loads UNDELETE TSR with Delete Tracking protection. If a drive is specified, it is added to the list of drives protected. |
| -entries | Specifies the maximum number of Delete Tracking file entries, ranging from 1 to 999. The default number for hard drives over 32Mb is 303. |
To check on Delete protection:
UNDELETE /STATUS
Displays the type of delete protection enabled for each drive.
To recover deleted files:
UNDELETE [filespec] [/DS | /DT | /DOS] [/LIST | /ALL] [/PURGE[drive]]
| command alone | Recover all deleted files in the current directory using the highest available method for that drive. |
| filespec | Identifies the file(s) you want to recover. |
| /DS | Recover using Delete Sentry: only those files listed in the \SENTRY directory. |
| /DT | Recover using Delete Tracking: only those files listed in the Delete Tracking file (PCTRACKR.DEL). |
| /DOS | Recover using DOS Directory: only those files internally listed in the Directory as deleted. |
| /LIST | Lists deleted files available for recovery, but does not actually recover them. The files listed depend on the filespec (if any) and the recovery method. |
| /ALL | Recover all deleted files without prompting for confirmation. The files recovered depend on the filespec (if any) and the recovery method. If the DOS Directory method is used, UNDELETE adds a number sign (#) as the first character in the file name. |
| /PURGE[drive] | Empties the \SENTRY directory on the drive specified. If no drive is listed, the default is the current drive. |
UNDELETE.INI is a standard ASCII text file, and can be view and edited in Notepad. Although it is not necessary, you can edit UNDELETE.INI to fine-tune the Undelete settings.
The file has five sections:
| [configuration] | Set the general defaults for Undelete protection: |
| archive=FALSE | indicates files are saved regardless of their archive attribute (if turned on, the archive bit indicates a file has changed since your last backup). If set to TRUE, then only files with the archive attribute will be protected. |
| days=7 | the number of days files are saved. |
| percentage=20 | the amount of disk space reserved for the \SENTRY directory (20% of hard disk space). |
| [sentry.drives] | Specifies the drives protected by Delete Sentry (if used) |
| [mirror.drives] | Specifies the drives protected by Delete Tracking (if used) |
| [sentry.files] | Specifies the files protected by either Delete Sentry or Delete Tracking. A hyphen before the filename indicates that file type is NOT saved. By default, all files are saved except these file types: *.TMP, *.VM*, *.WOA, *.SWP, *.SPL, *.RMG, *.IMG, *.THM, *.DOV. |
| [defaults] | Specifies the method of protection. The following defines Delete Sentry method: d.sentry=TRUE d.tracker=FALSE |
Deleting files by mistake can be serious business. However, with a little forethought in setting up UNDELETE with Delete Sentry in your AUTOEXEC.BAT, and using MS Undelete to undelete those files right away, your OOPS! can be followed by an exclamation of But that's Okay!
===============================
Kenneth E. Johnson is author of The Lawyer s Guide to Creating Web Pages, published by the American Bar Association, and is currently writing a book on Internet E-mail. He is Assistant Editor of the ABA s Network 2d newsletter, and Contributing Editor of Practical Windows and DOS World Magazines.
For more information on the Tulsa Computer Society click here