UnDelete v0.83 Beta for DOS - Freeware by W0rm




Hosted by AXCEL216's MAX Speeed WinDOwS Tricks + Secrets:
http://www.mdgx.com/
at "MS-DOS 5.00 - 8.00 ESSENTIALS":
http://www.mdgx.com/dos.htm
Direct download [9 KB]:
http://www.mdgx.com/files/udel.zip
... And vanished from original location [:(]:
http://dos.li5.org/

CAUTION: This is a beta test version. Use at your own risk!

This native/real/pure DOS mode tool works ONLY with drives partitioned with
FAT12, FAT16 or FAT32, NOT with NTFS/NTFS5 (WinNT/2000/XP/2003) or ext2/ext3
(Linux)!
If using Windows 95/98/ME, FIRST you need to exit the GUI (or reboot) to
native DOS, and then LOCK the desired drive/partition by running (example):
LOCK C:
Run this for help:
LOCK /?

In order to ensure UnDelete becomes a powerful utility that supports as many
conditions and DOS versions as possible, a list of things tested is included
in this document. Some things were tested simply to ensure UnDelete would
fail with an error message when UnDeletion would be impossible: network
drives, Windows etc.

Items marked with [+] were successful and those with [-] were unsuccessful,
probably because of an impossible UnDeletion condition:
- MS-DOS 7.00/7.10/8.00 [+]
- MS-DOS 6.00/6.20/6.21/6.22 [+]
- ROM-DOS 7.1 [+]
- PTS-DOS 2000 [+]
- FreeDOS 2025 [-]
- DR-DOS 7.03/7.05 [+]
- Windows 95/98/ME [-]
- Windows NT/2000/XP/2003 [-]
- FAT12 [+]
- FAT16 [+]
- FAT32 [+]
- MS-DOS/XMSDSK RAM Drives [+]
- DR-DOS/MS-DOS/ROM-DOS/IBM-DOS/PTS-DOS Partitions [+]
- Network/CD-ROM Drives [-]

UnDelete was written in MoonRock (a language created by Rowan Crowe).

Error messages:
- "File is too damaged to recover."
The FAT table was either read incorrectly or a portion of the file to undelete
has been overwritten by another file.

- "Could not read sector."
UnDelete simply could not read from a specified sector.
Possibly because it is a network drive, you are running under an incorrect
version of DOS or the disk being read from is bad.

- "Could not write sector."
UnDelete simply could not write to a specified sector.
This function may be impossible, the drive may be a network drive or the drive
may be bad/write-protected.

- "A file already exists with that name."
UnDelete could not undelete a file because a file already exists with the name
given to the file to be undeleted.

- "Directory could not be located."
This means the path to the appropriate file to undelete could not be found...
if this path does exist then this should be reported.

- "Direct disk access failed to enable."
This means UnDelete could not get permission to write to the disk... possibly
due to a multitasking environment currently running.

- "Too many parameters."
Use only "undelete filespec" to recover files; no switches, no multiple file
specifications, simply one statement... which can include wildcards.

- "Invalid path, file or syntax error."
Either your file included inacceptable characters or the path/drive to the
file didn't exist... or simply something relating to the command line.

- "Drive does not have a valid BootSector."
This likely indicates it is a network/CD-ROM drive, in which case it would be
impossible to undelete a file.

- "Cannot undelete from within Windows."
This is self explanatory. The low level disk functions used to write to the
drive are not acceptable to Windows. Use pure DOS when you want to undelete
files.

- "Deleted file(s) not found."
This is where the program could not locate the filename within the specified
directory... this does not mean it is not there, however, UnDelete may have
"missed" it, as this is a beta and could react differently with different
types of drives.

HISTORY:

0.82:
- Created new subroutines to optimize FAT entry getting/putting.
- Optimized "getrootsector" code to be faster, smaller and more reliable.
- "Key getting" was changed (only y/n/q/esc accepted).
- Fixed crucial 32-bit FAT mis-calculation.
- Optimized error reporting from sector reading/writing routines.
- Fixed finding the next cluster of a multiple-cluster directory entry.
- Replaced some calculations with Microsoft's for compatibility.
- Added some older functions for compatibility with older DOS types.
- Fixed "file already exists" to find directories also.
- Fixed tiny typo bug causing old sector writes to not work.

0.81:
- Fixed bug concerning FAT32 when the FAT double-word entry for a particular
file is half or less on the next sector.
- Fixed a bug causing the buffer to increase.
- Optimized quite a bit.

0.80:
- Fixed bug that stopped undelete from finding files when the directory entry
being searched did not fill a complete sector.
- Added some better checking for fat12/FAT16.
- Fixed bug when a file's FAT data is partly on the next sector.
- Fixed an incorrect routine used to figure out the bit number to start on for
recovery on fat12 partitions.
- Optimized a few things.

BUGS + MISSING FEATURES:

- UnDeleting Directories.
- A different routine needs to be created to handle wildcards, the current
"truename" function is undocumented.
- Should skip bad sectors.
- Needs to ensure it is not writing to reserved sectors.
- When entering paths, entries should be checked to ensure they are not files.
- Each file's condition should be reported rather than quitting when recovery
is attempted if the file is too badly damaged.
- Might need to support different sector sizes for ramdrives, etc.
- A different Windows detection routine should be used, the current one can be
"lied to" too easily.
- Need to use "sectors per root" for FAT12/FAT16 to know if a file has not
been found in the root directory to speed the process.