home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / DOS_HELP / FAT_UTIL.ZIP / UNERASE.DOC < prev    next >
Encoding:
Text File  |  1986-08-10  |  4.0 KB  |  82 lines

  1.                         UNERASE.DOC v1.1
  2.                             06/20/86
  3. Eric Gans
  4. French Dep't UCLA
  5. Los Angeles, CA 90024
  6.  
  7. Version 1.1
  8.      Found  a bug (thanks to Bill Cox) that couldn't find a  file 
  9. in  the  root directory of a non-default  disk.   Simplified  the 
  10. entry  routine  to  allow command line entry of  the  drive-path-
  11. filename.
  12.  
  13.      Since  immigrating to MS-DOS,  I have felt the absence of  a 
  14. public domain undelete program that unlike UNDEL.COM will work on 
  15. all  kinds of disks.  UNERASE is meant to fill this  gap.   (CP/M 
  16. users can use my XRASE program for this purpose.)  
  17.  
  18.      UNERASE  should work on any disk up to 20 megs,  or 30 if it 
  19. has fewer than 12,800 blocks,  which would be the case with a  4K 
  20. block size.   (Since this is merely a question of buffer size, it 
  21. would  be  easy to change.)  In case your deleted file is a  text 
  22. file,  you have the option of viewing the doubtful blocks  (those 
  23. after the first) before accepting them back in the file.
  24.  
  25. Format: unerase [d:][\path\]filename 
  26.      If you just enter "unerase" you will be prompted.
  27.      The  current drive need not be entered,  but you must  enter 
  28. the  entire  path starting from the root.  (You can write  a:blrk 
  29. instead of a:\blrk).
  30.  
  31.                             DBACK.COM
  32.  
  33.      Because  unerasing  on a hard disk is a  delicate  procedure 
  34. (the FAT and part of the directory must be rewritten to disk),  I 
  35. have  included in this ARC DBACK.COM,  which will back up the FAT 
  36. and root directory of a (hard) disk on another (floppy) disk, and 
  37. restore it in case catastrophe strikes.   DBACK makes a read-only 
  38. file called DBACK.DRx (x = backed up drive) in the root directory 
  39. of  the  backup drive.   For extra  security,  run  DBACK  before 
  40. unerasing;  since  the backup file is written on another disk  it 
  41. won't disturb the unerase procedure.  
  42.  
  43.      DBACK  is  also useful for general disk  security  purposes, 
  44. especially  for  assembly-language  programmers who are  often  a 
  45. keystroke or two away from trashing their disk.
  46.  
  47.      Don't  forget to copy DBACK.COM to a backup disk.   If it is 
  48. on  a  different diskette than DBACK.DRx,  you will  be  able  to 
  49. change  disks while running the program.   Just remember that  if 
  50. you ever need DBACK to restore your hard disk directory you won't 
  51. be able to find it there!
  52.  
  53. Notes:
  54.  
  55.      UNERASE  gets its disk information from the boot  sector  of 
  56. the  disk.   It  then  reads the FAT into memory  and  finds  the 
  57. filename of the lost file (its first byte has been replaced by E5 
  58. to  show erasure) in the appropriate directory,  which is located 
  59. on disk by following its path from the root disk directory.   The 
  60. first  block  of  the  file,  if  still  unused,  is  tentatively 
  61. restored.   Since  the  length of the file has  remained  in  the 
  62. directory  entry,  the  program  moves through the  FAT  checking 
  63. unused blocks.   If you use the verify option,  these blocks will 
  64. be  printed  on screen for inspection (this only works  for  text 
  65. since I haven't implemented a hex dump for object files).  If you 
  66. haven't  been doing too much erasing on your disk and  your  lost 
  67. file wasn't too fragmented, UNERASE should do the job.
  68.  
  69.      Undeleting  in DOS is less reliable than in CP/M  since  the 
  70. FAT  block addresses (after the first,  which is in the directory 
  71. entry)  are zeroed out,  whereas CP/M keeps them all in the  file 
  72. directory  until  the file's entry is  overwritten.   
  73.      
  74.      I  wonder  what  makes operating system writers so  hard  on 
  75. accidental   deletions;   sophisticated  MS-DOS  is   even   more 
  76. unforgiving than primitive CP/M.   Why can't a reliable  undelete 
  77. utility  be  supplied with the system (UNIX  does  this,  doesn't 
  78. it??),  or  at  least made available to programmers as  a  system 
  79. call?    DOS  could implement this easily enough,  for example by 
  80. only zeroing out the deleted blocks in one copy of the FAT (there 
  81. are always two) until the next disk write.
  82.