UNDELETE Does Not Work If File Deleted from Windows or Shell (74466)

The information in this article applies to:
    Microsoft MS-DOS operating system 5.0
    Microsoft MS-DOS operating system 5.0a
    Microsoft MS-DOS operating system 6.0
    Microsoft MS-DOS operating system 6.2
    Microsoft MS-DOS operating system 6.21
    Microsoft MS-DOS operating system 6.22

This article was previously published under Q74466


With the MIRROR deletion tracking program loaded (for example, MIRROR /TC), UNDELETE does not work if the deletion has been done through Windows or MS-DOS Shell File Manager. This deletion tracking program, which is a TSR (terminate-and-stay-resident program), cannot detect the deleted files because Windows and Shell delete files through ROM instead of standard interrupts.

When MIRROR is installed, it tracks which files have been deleted. When UNDELETE /DT is run, MIRROR can recover all available clusters in the deleted file. However, when a file is deleted inside MS-DOS Shell, the file is not added to the list of deleted files. For this reason, UNDELETE /DT does not work (inside Shell or from DOS) if the file has been deleted in Shell.

The only way to undelete the file is to use the /DOS switch on the UNDELETE command.


If a file has been deleted in Windows or Shell, and you want to undelete it, shell out of Windows or MS-DOS Shell and issue the following command:
   UNDELETE <filename> /DOS
The /DOS switch recovers only those files that are internally listed as deleted by MS-DOS 5.0. If a deletion-tracking file exists, this switch causes UNDELETE to ignore it. Because the deletion tracking is ignored, the first character of a filename used to mark as available for reuse will not be retrievable. "UNDELETE <filename/s> /DOS" will prompt you for the first character of the filename.

Do not use Windows or MS-DOS Shell File Manager to delete or undelete. Exit Windows or Shell and carry out the command from the C prompt. UNDELETE will not work by shelling out from Windows or Shell even though the deletion tracking program is installed prior to running Windows or Shell.

Modification Type: Major Last Reviewed: 5/12/2003
Keywords: KB74466