home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / d / diskut45.zip / DISK45.EXE / DISKUTL.DOC < prev    next >
Text File  |  1992-09-18  |  23KB  |  523 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.            *******************************************************
  7.            |            RO-SOFT   SYSTEMS   (C) 1992             |
  8.            |=====================================================|
  9.            |   DISK UTILITIES   Ver 4.5   BY  Robert  Ossowski   |
  10.            *******************************************************
  11.  
  12.  
  13.                        * MAKE  YOUR  COMPUTING  EASY *
  14.  
  15.  
  16.                            _______
  17.                       ____|__     |               (R)
  18.                    --|       |    |-------------------
  19.                      |   ____|__  |  Association of
  20.                      |  |       |_|  Shareware
  21.                      |__|   o   |    Professionals
  22.                    -----|   |   |---------------------
  23.                         |___|___|    MEMBER
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.         Table of Contents :                                      Page
  31.  
  32.  
  33.                 Disk scan routine SCANDISK.EXE .................   1
  34.  
  35.                 Permanent sort & compact directories SORTDIR.EXE   1
  36.  
  37.                 Disk optimiser routine DEFRAG.EXE ..............   2
  38.  
  39.                 File recovery routine UNDELETE.EXE .............   4
  40.  
  41.                 Double directory list/print/all dirs DDIR.EXE ..   5
  42.  
  43.                 Repeat command in all directories REPTCOMM.EXE .   6
  44.  
  45.                 Disk directory tree report TREE.EXE ............   7
  46.  
  47.                 File find list/print WHERE.EXE .................   8
  48.  
  49.  
  50.  
  51.                  These routines have been tested using DOS Versions
  52.                 3.1, 3.3, 4.01, and 5.0, on 5.25 and 3.5 inch
  53.                 floppies, and hard disk partitions up to 81 Meg.
  54.  
  55.  
  56.  
  57.                                                                 Page   1
  58.  
  59.  
  60.                          *********************************
  61.                          *  DISK UTILITIES  BY  RO-SOFT  *
  62.                          *********************************
  63.  
  64.  
  65.                             * SORT  DISK DIRECTORIES *
  66.  
  67.  
  68.         * SORTDIR.EXE * This utility inputs a drive letter and directory name
  69.         for sort first by filename, & then by file extent. It loads and sorts
  70.         the directory, clears out all deleted entries, then stores the sorted
  71.         directory on the disk. The global character * may be used in order to
  72.         have all the directories on a drive sorted.
  73.  
  74.  
  75.         Program sign-on prompt is as follows :
  76.  
  77.  
  78.         Enter DIR Name ?
  79.  
  80.         Entry Format :  d:\dirname (ie. c:\mydir)
  81.                         d:*  For all dirs on drive
  82.                         d:\  For just root dir
  83.         Directories will be sorted and compacted
  84.  
  85.  
  86.                         * SCAN A DISK FOR READ ERRORS *
  87.  
  88.  
  89.         * DISKSCAN.EXE * This routine will check the readability of an entire
  90.         disk  partition.  It first checks  the file allocation table  for any
  91.         disk clusters marked as bad and reports any found.  Then it starts at
  92.         sector zero, reading the disk in 64K byte blocks.  If a read error is
  93.         detected,  it will report the  error type  returned by DOS  and begin
  94.         checking that area one sector at a time.   At any sector returning an
  95.         error,  the file allocation table is checked  for the recorded status
  96.         and a message is displayed  (i.e. Flagged as bad, Un-allocated, or In
  97.         -use by file). If the sector is in a reserved area, a message indicat-
  98.         ing so will be displayed(i.e. Boot sector, Root directory, File alloc
  99.         table).   At completion of this sector by sector search it will cont-
  100.         inue search in 64K blocks to the end of disk partition.
  101.  
  102.           No attempt is made by this routine to  correct any errors  found.
  103.         Its only function is to give the error report.  Command options may
  104.         be entered at run time or the program will prompt you for an input.
  105.         Options format is  (drive:/P(n)),  where drive is the assigned disk
  106.         letter, /P = Output errors to printer, (n) =1 or 2 for Lpt1 or Lpt2.
  107.  
  108.  
  109.                                                                 Page   2
  110.  
  111.  
  112.  
  113.                          *********************************
  114.                          *  DISK UTILITIES  BY  RO-SOFT  *
  115.                          *********************************
  116.  
  117.  
  118.                          *  DISK  OPTIMIZER  DEFRAG.EXE  *
  119.  
  120.  
  121.  
  122.         * DEFRAG.EXE *  This routine will correct fragmented data files on your
  123.         disks,allowing most applications to run much faster on your system. The
  124.         present version works on all files in directories no more than five dir
  125.         levels deep from the root directory. Any Files or Dirs beyond the fifth
  126.         level will hinder defrag and disk pack operations.  Entries over  1,024
  127.         in a single sub-directory will be ignored.  Maximum hard disk partition
  128.         is limited to approximately 130M Bytes.   Command options may include a
  129.         drive letter and a  /P or  /P2  (i.e. d:/p).   This should be run about
  130.         once a week to keep your files in good shape.  The  /P option invokes a
  131.         more intensive data storage compression cycle.  This option shifts data
  132.         to fill all unused disk clusters  leaving all free space in one area at
  133.         the end of disk.  This option takes quite a while to complete.   Use of
  134.         these options are only necessary if normal defrag cannot clear all file
  135.         fragments.  The /P2 Option adds another check to the pack cycle for use
  136.         on nearly full disks with a lot of fragmentation.  You should not norm-
  137.         ally need to use  this option.   The map option  displays the status of
  138.         all disk clusters and highlights any breaks in cluster strings.
  139.  
  140.  
  141.         The sign-on screen prompting for drive & option entry is as follows :
  142.  
  143.  
  144.                  To defragment files on a disk
  145.  
  146.  
  147.                 Enter new drive ? ................................
  148.  
  149.  
  150.                 Entry Format :  drive:/p (ie. c: or c:/p for drive c)
  151.                                 Add the /p for badly fragmented drives
  152.  
  153.  
  154.                 ! BACK UP YOUR FILES BEFORE RUNNING DEFRAG !
  155.  
  156.  
  157.  
  158.                              Press "Esc" to exit !
  159.  
  160.  
  161.                                                                 Page   3
  162.  
  163.  
  164.                          *********************************
  165.                          *  DISK UTILITIES  BY  RO-SOFT  *
  166.                          *********************************
  167.  
  168.  
  169.                           * DISK  OPTIMISER  DEFRAG.EXE *
  170.  
  171.  
  172.           After entering drive & options, data for all directories on the
  173.         disk is being read while displaying the following screen :
  174.  
  175.  
  176.                Checking Dir : C:\TASM\WORK
  177.  
  178.  
  179.                              * Getting Disk Data *
  180.  
  181.  
  182.                         Press "Esc" to abort optimization
  183.  
  184.  
  185.           The displayed directory name changes as each dir is scanned for
  186.         fragmentated files.  When this scan is completed, the results are
  187.         displayed on screen as follows :
  188.  
  189.  
  190.  
  191.                            542 File Fragments Detected
  192.  
  193.  
  194.  
  195.           Press "M" for allocation map, "C" to continue, or "Esc" to exit
  196.  
  197.  
  198.  
  199.           At this prompt, you may select "M" to display the disk cluster
  200.         mapping of the results of the scan, "C" to continue into the
  201.         defragging process, or "Esc" to abort the program.
  202.  
  203.           On entering  "C",  the directories on the drive are sequentially
  204.         evaluated,  and fragmented files  are moved to a new location.  At
  205.         the completion  of each  directory cycle,  if you  entered the  /P
  206.         option,  a data compact cycle  is initiated.  This frees up blocks
  207.         of sequential clusters to relocate more fragmented files.  As this
  208.         process continues, all file segments being moved will be displayed
  209.         on-screen with the present cluster location first,and then the new
  210.         cluster to which that file segment  is being moved.   Pressing the
  211.         "Esc" key  will interrupt the cycle at any time.   Upon exiting, a
  212.         new check is made  for file fragments remaining  and is displayed.
  213.         The program may be run again at any time to continue the process.
  214.  
  215.  
  216.                                                                 Page   4
  217.  
  218.  
  219.                         *********************************
  220.                         *  DISK UTILITIES  BY  RO-SOFT  *
  221.                         *********************************
  222.  
  223.  
  224.                          * DISK  OPTIMISER  DEFRAG.EXE *
  225.  
  226.  
  227.                         * DISK  ALLOCATION  MAP  LISTING *
  228.  
  229.  
  230.   When you select the disk mapping option all disk cluster allocation will be
  231. listed on screen, starting with the first page.     The clusters where a file
  232. break occurs  will be highlighted  so you can see the shape your disk data is
  233. in.  You can page back and forth through this listing.  Each four digit entry
  234. is a hexadecimal number defining the location of the next cluster of data for
  235. this data block.   Clusters in numeric sequence indicate an unbroken block of
  236. data. A "FFFF" entry indicates the last cluster of data in a particular file.
  237. The first entry on the first page is a  disk type  ID entry.  This allocation
  238. table is called a "FAT TABLE".  FAT stands for (File Allocation Table).
  239.  
  240.  
  241.           Disk C: File allocation clusters       0000 h - 00FE h
  242.           All entries in hexidecimal            2,048 Bytes per cluster
  243.  
  244. FFF8 FFFF 0003 0004 0005 0006 0007 0008 0009 000A 000B 000C 000D 000E 000F 0010
  245. 0011 0012 FFFF 0014 0015 0016 0017 0018 0019 001A 001B 001C 001D 001E 001F 0020
  246. 0021 0022 0023 0024 0025 FFFF FFFF 0028 0029 002A 002B 002C 002D 002E 002F 0030
  247. 0031 0032 0033 0034 0035 0036 0037 FFFF 0039 003A 003B 003C 003D 003E 003F 0040
  248. 0041 0042 0043 0044 0045 0046 0047 0048 0049 004A FFFF 004C 004D 004E 004F 0050
  249. 0051 0052 0053 0054 0055 0056 0057 0058 0059 005A 005B 005C 005D FFFF FFFF FFFF
  250. FFFF FFFF FFFF 0064 FFFF 0066 0067 0068 0069 006A 006B 006C 006D 006E FFFF 0070
  251. 0071 0072 0073 FFFF 0075 0076 0077 0078 0079 007A 007B 007C 007D 007E FFFF 0080
  252. 0081 0082 0083 FFFF 0085 0086 0087 0088 0089 FFFF 008B 008C 008D 008E 008F 0090
  253. 0091 0092 0093 0094 0095 0096 0097 0098 0099 009A 009B 009C 009D 009E 009F 00A0
  254. 00A1 00A2 00A3 00A4 00A5 00A6 00A7 00A8 00A9 FFFF 00AB 00AC 00AD 00AE 00AF 00B0
  255. 00B1 00B2 00B3 00B4 00B5 FFFF 00B7 00B8 00B9 00BA 00BB 00BC 00BD 00BE 00BF 00C0
  256. 00C1 00C2 00C3 00C4 00C5 00C6 00C7 FFFF 00C9 00CA 00CB 00CC FFFF 00CE 00CF 00D0
  257. 00D1 00D2 00D3 00D4 00D5 FFFF 00D7 00D8 00D9 00DA 00DB FFFF 00DD 00DE 00DF 00E0
  258. 00E1 00E2 FFFF 00E4 00E5 FFFF 00E7 00E8 00E9 00EA 00EB 00EC 00ED 00EE 00EF 00F0
  259. 00F1 00F2 00F3 FFFF 00F5 FFFF 00F7 FFFF 00F9 FFFF FFFF 00FC 00FD 00FE 00FF 0100
  260.  
  261.           ■ FFFF = File end cluster            ■ FFF7 = Cluster marked bad
  262.           ■ ???? = Next cluster in string      File breaks are highlighted
  263.           ■ 0000 = Unallocated cluster         First entry is disk type ID
  264.  
  265.                 Press Page-Up, Page-Down, or Esc to exit
  266.  
  267.  
  268.                                                                 Page   5
  269.  
  270.                          *********************************
  271.                          *  DISK UTILITIES  BY  RO-SOFT  *
  272.                          *********************************
  273.  
  274.                             * RECOVER  DELETED  FILES *
  275.  
  276.         * UNDELETE.EXE *   This utility attempts the restoration of previously
  277.         deleted files.  It searches all directories of the current drive for a
  278.         matching an entered filename. If a file is found,it marks it undeleted
  279.         and assigns succeeding unallocated FAT entries, starting with assigned
  280.         file beginning cluster, to this file.   This may, or may not, make the
  281.         file usable.   If no files have been moved on the disk since this file
  282.         was deleted it should then be a usable file.
  283.         If a name is not entered, all deleted files and directories on current
  284.         or specified drive  will be displayed  to mark for recovery as you see
  285.         fit.  The Probability of recovery is checked and listed as Good, Fair,
  286.         Poor, or None.  Sign-on prompt is as follows :
  287.  
  288.         Enter Filename  ?
  289.  
  290.         Entry format to recover deleted files
  291.         For a specified file  : d:\filename.ext (i.e. c:\myfile.txt)
  292.         To select from list : "Enter" (current drive) or "c:" (drive c:)
  293.         All directories on disk will be searched
  294.  
  295.                              Press -Esc- To Exit !
  296.  
  297.         If the file is restored its full pathname will be listed.
  298.  
  299.  
  300.                             UNDELETE DISPLAY FORMAT
  301.  
  302.            18 Deleted Files Located                     Chance of Recovery
  303.  
  304.            C:\?TEST\  <DIR>                                 GOOD
  305.            ?LLOC.ASM          321 11-03-91   2:55p   A      GOOD
  306.            ?TSIZE.ASM       3,467  8-16-91   9:16p   A      GOOD
  307.            ?AKUP.ASM        7,308  8-15-91  11:11a   A      FAIR
  308.            ?UTSTAT.ASM        936 12-08-91   3:46p   A      GOOD
  309.            ?HECKID.ASM        291 12-12-91  10:20a   A      GOOD
  310.            ?HECKID1.ASM       193 11-03-91   3:02p   A      GOOD
  311.            ?HNGCON.ASM        956  5-12-91   2:05p   A      GOOD
  312.            C:\TASM\?EST\  <DIR>                             GOOD
  313.            ?LLOC.ASM          321 11-03-91   2:55p   A      GOOD
  314.            ?TSIZE.ASM       3,467  8-16-91   9:16p   A      GOOD
  315.            ?AKUP.ASM        7,308  8-15-91  11:11a   A      GOOD
  316.            ?UTSTAT.ASM        936 12-08-91   3:46p   A      GOOD
  317.            ?ALC.ASM        23,581 12-19-91  11:32a   A      POOR
  318.            ?HECKID.ASM        291 12-12-91  10:20a   A      GOOD
  319.            ?HECKID1.ASM       193 11-03-91   3:02p   A      GOOD
  320.            ?HNGCON.ASM        956  5-12-91   2:05p   A      GOOD
  321.  
  322.            Enter new filename character to mark for recovery
  323.            Press "F10" to recover marked files or "Esc" to abort
  324.  
  325.  
  326.                                                                 Page   6
  327.  
  328.  
  329.  
  330.                          *********************************
  331.                          *  DISK UTILITIES  BY  RO-SOFT  *
  332.                          *********************************
  333.  
  334.  
  335.  
  336.                          * REPEATE A COMMAND IN ALL DIRS *
  337.  
  338.  
  339.         * REPTCOMM.EXE * This routine allows entry of a command to be executed
  340.         in all directories on a specified drive.  It is useful for clean up of
  341.         misc. un-wanted files,  or as suggested on sign-on,  getting a printed
  342.         list of all files on a drive using a dir command.   If not an internal
  343.         DOS command, the directory location of the command file must be in the
  344.         DOS search path as set in your AUTOEXEC.BAT file.
  345.           The sign on prompt is as follows:
  346.  
  347.         To execute a command in all directories on a drive
  348.  
  349.         Enter COMMAND ? ..........................
  350.  
  351.         Entry format :  [/command] for current drive
  352.                         [drive:/command] for new drive
  353.         Command will be executed in all directories on specified drive
  354.         [ie. c:/ddir /p] To print listing of all files on drive C
  355.         Remember that directory of ddir must be in the DOS search path
  356.  
  357.  
  358.                                                                 Page   7
  359.  
  360.  
  361.                          *********************************
  362.                          *  DISK UTILITIES  BY  RO-SOFT  *
  363.                          *********************************
  364.  
  365.  
  366.                           * DOUBLE COLOR DIR LIST/PRINT *
  367.  
  368.         * DDIR.EXE * This routine prints and or lists a disks directories in
  369.         double column format, pausing for user input at each page end unless
  370.         the print option,/p was entered. If run from the DOS prompt, you may
  371.         enter the drive and path as a command option  (i.e. ddir d:\newdir).
  372.         All file names, listed or printed, are first sorted by name, then by
  373.         extent.  If you have a color monitor,  the different extents will be
  374.         displayed in different colors.
  375.  
  376.            To run, enter the command (DDIR option). See option format below.
  377.         If no command option is entered,  the program will prompt you for an
  378.         option entry. The option may contain the disk drive designation, the
  379.         desired directory pathname,  a /p to print,  or a /# for all dirs on
  380.         the drive.   Just pressing the "Enter" key at prompt, will list only
  381.         current directory.    Filenames may be entered in the PATH using DOS
  382.         wildcard characters * and ?.
  383.  
  384.         Valid entries as follows :
  385.  
  386.         c:\Yourdir\*.com         :List all .com files in c:\Yourdir
  387.         c:\Yourdir /p            :List & print all files in c:\Yourdir
  388.         d:                       :List files in current directory of d:
  389.         d: /p /#                 :List & print all files in all dirs on d:
  390.         c:BR??????.* /#          :List all files on c: starting with BR
  391.  
  392.  
  393.  
  394.         DDIR.EXE : This is a sample listing provided by this routine
  395.  
  396.                                 Directory of  C:\HELP
  397.         ***********************************************************************
  398.         .           <DIR>    5-26-91  9:35a |DOSINT   HLP 306000 7-07-91  5:54p
  399.         ..          <DIR>    5-26-91  9:35a |DOSSYS   HLP 166000 6-26-91  9:54a
  400.         DOSHELP  ASM   43047 9-29-91  4:33p |DISKS    HLP  84000 6-26-91  9:51a
  401.         DOSHELPM ASM   40916 9-29-91  4:38p |HELP     HLP   6000 7-14-91  6:01p
  402.         EDIT     CLP   20000 7-15-91  6:03p |MOUSE    HLP  42000 6-21-91 10:16p
  403.         WP       CLP  348000 7-15-91 10:43a |OPECODE  HLP  42000 5-27-91  9:58a
  404.         DOSHELPM EXE   11530 9-27-91 12:43p |SHELL    HLP   2000 9-17-91  2:12p
  405.         DOSHELP  EXE    5852 9-29-91  3:15p |VIDEO    HLP 142000 7-09-91 11:24a
  406.         BIOSINT  HLP  158000 7-09-91 12:27p |ASCII    HLP  34000 6-26-91  7:10p
  407.         COMMAND  HLP  334000 6-20-91  8:33p |WPMONO   HLP 174000 6-12-91  6:49p
  408.         DIR      HLP  102000 6-12-91  5:04p |
  409.         ***********************************************************************
  410.                21 File(s)   2910208 bytes free
  411.  
  412.                    |****** Press any key to continue ******|
  413.  
  414.  
  415.                                                                 Page   8
  416.  
  417.                          *********************************
  418.                          *  DISK UTILITIES  BY  RO-SOFT  *
  419.                          *********************************
  420.  
  421.                              * DISK  DIRECTORY TREE *
  422.  
  423.  
  424.         * TREE.EXE *   This routine lists or prints a disk directory  drawing
  425.         a tree like  presentation  giving the  directory name,  the number of
  426.         files in each directory, and the number of bytes of data stored.  The
  427.         print option may be aborted at any time by pressing the Esc key.
  428.  
  429.  
  430.              If run from the DOS prompt,  you may enter the drive and option
  431.         along with the command  (i.e. tree d:/p), or the program will prompt
  432.         you for the input as follows.
  433.  
  434.  
  435.         Enter new drive ?
  436.  
  437.         Press "Enter" to list tree of current drive
  438.         Entry may contain drive: and /p for print option
  439.         (ie. c:/p) Will both list and print tree of drive C:
  440.         (ie. c:/p2) Will list and print on LPT2
  441.  
  442.  
  443.  
  444.  
  445.                              DIRECTORY TREE LISTING
  446.  
  447.  
  448.         E:|-\                                           0 Bytes in     1 Files
  449.         E:|-\TEST                                 321,689 Bytes in    30 Files
  450.         E:|-\PAINT                              1,000,476 Bytes in   129 Files
  451.         E:|-\ASM                                   35,628 Bytes in     5 Files
  452.         E:|-\DOSHELP                              321,722 Bytes in    28 Files
  453.         E:|-\HELP                               2,034,490 Bytes in    16 Files
  454.         E:|-\TASM                                       0 Bytes in     0 Files
  455.               >-\WORK                             536,655 Bytes in    46 Files
  456.                   >-\TEST                           4,506 Bytes in     1 Files
  457.                                                 
  458.  
  459.                  Drive totals =    4,255,166 Bytes in   256 Files
  460.  
  461.  
  462.  
  463.                                     END TREE
  464.                           Press any key to continue
  465.  
  466.  
  467.                                                                 Page   9
  468.  
  469.                          *********************************
  470.                          *  DISK UTILITIES  BY  RO-SOFT  *
  471.                          *********************************
  472.  
  473.                                 * FILE  LOCATOR *
  474.  
  475.  
  476.         * WHERE.EXE * This routine inputs a filespec, searches all directories
  477.         on drives, and reports all locations of found files.  If more than one
  478.         screen page is found, it awaits user input to go to the next page. The
  479.         file pathnames may be up to ninety-five characters long,and ten levels
  480.         deep from the root directory.
  481.  
  482.  
  483.           You may enter the filespec at the command level, or the program will
  484.         prompt for an entry.  The filespec should contain a filename, and file
  485.         extent as required. Any KNOWN letters of the name, and wild card char-
  486.         acters may be used.   The "?" may be substituted for any unknown char-
  487.         acter.   The "*" indicates ALL for either name or extent.  The command
  488.         options may be a drive letter followed by a colon,  and a single digit
  489.         number.  The number designates how many drives to search,  starting at
  490.         the input drive letter.   Entering /p at the end of the command option
  491.         will cause the search results to be listed and printed.
  492.  
  493.  
  494.         Entries may be as follows :
  495.  
  496.         * *.dat A:4/p * List,& print all files with .DAT ext. drives A: thru D:
  497.         * dat.* D:1   * Find & list all files with name DAT on drive D:
  498.         * dat?????.*  * Find & list all files beginning with DAT
  499.         * da???.*     * List all files with a five letter name starting w/DA
  500.         * Default searches up to 10 drives starting with drive C:
  501.  
  502.                     Enter search command or "Esc" to exit
  503.  
  504.  
  505.         * WHERE.EXE * This is a sample listing supplied by this routine
  506.  
  507.  
  508.                         Searching for file : *.DAT
  509.                                                         
  510.         C:\CIM\FAVORITE.DAT                             375  8-29-91  7:43p
  511.         C:\SHARE32\SHELLHLP.DAT                      39,791  6-27-91  8:23a
  512.         C:\SHARE34\SHELLHLP.DAT                      43,598  8-29-91  1:15p
  513.         C:\TASM\SHELL\SHELLHLP.DAT                   43,598  8-20-91  2:18p
  514.         C:\TASM\WORK\ASCII.DAT                       26,621  6-25-90  5:57p
  515.         C:\TASM\WORK\BIOSINT.DAT                     88,426  7-09-90 12:26p
  516.         C:\TASM\WORK\COMMAND.DAT                    227,607  8-20-91  7:45p
  517.         C:\TASM\WORK\DISKS.DAT                       50,715  8-02-90  7:51p
  518.         D:\TASM\WORK\DISKS.DAT                       50,715  8-02-90  7:51p
  519.         D:\TASM\WORK\DOSINT.DAT                     161,454  1-22-91  8:34a
  520.         D:\TASM\WORK\DOSSYS.DAT                     116,680 10-13-90  2:26p
  521.  
  522.  
  523.