home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / HILFEN / SYSTEM / ORG / ORG.DOC < prev    next >
Text File  |  1993-12-01  |  50KB  |  1,216 lines

  1.  
  2.  
  3.           Documentation for ORG V:2.0         Copyright 90/91, M.H. Greve
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                         ORG - Hard Disk Organizer Utility
  25.  
  26.                               Copyright (1990/1991)
  27.                              M.H. Greve + D. Rifkind
  28.                                All Rights Reserved
  29.  
  30.  
  31.  
  32.                         Distributed by:
  33.  
  34.                                Greve Computer Systems
  35.                                Aubrigstrasse 23
  36.                                CH 8804 AU
  37.                                Switzerland
  38.  
  39.  
  40.  
  41.                         Date:  April 6. 1991
  42.  
  43.  
  44.  
  45.  
  46.  
  47.           Documentation for ORG V:2.0         Copyright 90/91, M.H. Greve
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.                                      TABLE OF CONTENTS
  56.  
  57.  
  58.        1. Introduction                                               1
  59.        2. Getting Started - Installation                             2
  60.        3. About ORG                                                  4
  61.        4. The Configuration File                                     6
  62.        5. Command Line Switches                                     12
  63.        6. Limitations and Restrictions                              14
  64.        7. Acknowledgment                                            15
  65.  
  66.           Appendix A - Program Termination codes                    16
  67.           Appendix B - Error Messages                               17
  68.           Appendix C - Bugs                                         19
  69.           Registration Form                                         20
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.                                        Page 1
  77.           
  78.           Documentation for ORG V:2.0         Copyright 90/91, M.H. Greve
  79.  
  80.  
  81.  
  82.  
  83.        1. INTRODUCTION
  84.        ---------------
  85.  
  86.           ORG is a Disk Organizer with a lot of features not found in
  87.           other similar programs. In addition to the traditional function
  88.           of un-fragmenting your disk, ORG will allow you to customize the
  89.           sequence in which files are placed on the disk, let you "lock"
  90.           (leave unchanged) any file or group of files, sort files in any
  91.           directory and delete temporary files on the fly, all in a single
  92.           pass.  Moreover, ORG does this as fast or faster than most
  93.           commercially available unfragmentation software. As you will
  94.           discover when you use the program:
  95.  
  96.           "ORG is the only Disk Organizer that truly deserves the name!"
  97.  
  98.  
  99.  
  100.           User Supported Software:
  101.           ------------------------
  102.  
  103.           ORG is distributed as "Shareware" or "User Supported Software"
  104.           and is fully copyrighted.  You may have received a copy of ORG
  105.           free from a friend or a bulletin board or (for a nominal fee)
  106.           from a user's group or Shareware library.  However you received
  107.           ORG, you have a perfectly legal copy of the software.  You are
  108.           encouraged to make as many copies of the software and this
  109.           documentation as you like and distribute it to anyone you want,
  110.           as long as you do not charge a fee (other than to cover your own
  111.           distribution cost) and distribute only complete, unaltered copies
  112.           of the package, exactly as you received it.  If, after trying the
  113.           program for a few weeks, you find it useful and use it regularly,
  114.           you must register your copy by completing the form included at
  115.           the end of this documentation and sending it together with your
  116.           registration fee of $30.00 to the address shown on the form.
  117.           Full 'C' source code is available for an additional $15.- to
  118.           registered users.
  119.  
  120.           As a registered user you will receive a copy of the very latest
  121.           version of ORG and will be entitled to free support and will
  122.           receive upgrade notices and "bug fixes" as and when these become
  123.           available (for one full year from the date of purchase).
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.                                        Page 2
  132.           
  133.           Documentation for ORG V:2.0         Copyright 90/91, M.H. Greve
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.        2. GETTING STARTED & INSTALLATION
  142.        ---------------------------------
  143.  
  144.           This section provides step by step instructions for running ORG
  145.           on any drive of a standard IBM PS/2, IBM PC, XT, AT, or any 100%
  146.           compatible running under MSDOS 2.10, or higher.
  147.  
  148.           If you are eager to run ORG right away, you need only read this
  149.           chapter now and can revert to the rest of the documentation for
  150.           a detailed description of the program's features and options
  151.           later.
  152.  
  153.           Note that you should never attempt to run ORG under a multi-
  154.           tasking operating system or OS-shell such as OS/2, Windows,
  155.           DesqView or Software Carousel, nor activate any "pop-up" program
  156.           (eg. SideKick) while the program is running.
  157.  
  158.           1. Before you start, use the DOS DISKCOPY command to make a
  159.              duplicate of the distribution disk or, if you downloaded ORG
  160.              from a bulletin board, save the archive file onto two
  161.              diskettes and store one (the original) in a safe place.
  162.  
  163.           2. ORG does not require any special installation procedure. You
  164.              may run ORG from the backup floppy disk or from a subdirectory
  165.              on your hard disk.  If you wish to run the program from your
  166.              hard disk, copy the ORG.EXE program file to a subdirectory
  167.              which is included in your DOS PATH (see your DOS User's Guide)
  168.              and place the ORG.CFG file in the same directory or in the
  169.              root directory of the drive you wish to "unfragment".
  170.  
  171.           3. If you are running ORG for the first time, make sure you have
  172.              a current backup of the drive you wish to unfragment. You may
  173.              also wish to remove any resident utilities such as disk-cache
  174.              programs in order to avoid any potential conflicts.
  175.  
  176.           4. Run the DOS CHKDSK program on the drive and correct any errors
  177.              reported by it before proceeding further. If there are lost
  178.              clusters or cross-linked files on the disk, ORG will detect
  179.              this and refuse to run.
  180.  
  181.           5. Make the drive and/or directory containing ORG.EXE the current
  182.              drive/directory. (Not necessary if ORG.CFG is in a directory
  183.              contained in your PATH).
  184.  
  185.  
  186.                                        Page 3
  187.           
  188.           Documentation for ORG V:2.0         Copyright 90/91, M.H. Greve
  189.  
  190.  
  191.  
  192.  
  193.           6. Start ORG from the DOS prompt by typing:
  194.  
  195.                      ORG [d:] [/F] [/SIM] <Enter>
  196.  
  197.           The parameter d: is any valid drive specifier known to your system
  198.           (except a RAM disk or Network drive). ORG assumes the current
  199.           default drive if you omit the drive specifier.  Normally, ORG will
  200.           only unfragment the files without regard to their sequence on the
  201.           drive.  The /F parameter causes ORG to perform a complete disk
  202.           organization, placing files in the sequence specified in the
  203.           configuration file (see chapter 4:  The Configuration File).  In
  204.           default mode, ORG will normally optimize a 30MB drive in less than
  205.           two minutes.  The /SIM parameter (simulation mode) prevents ORG
  206.           from actually writing anything to disk.  As a first time user, you
  207.           may wish to use /SIM to uncover any potential conflicts with your
  208.           computer setup.
  209.  
  210.           ORG first reads the configuration file and the drive parameters of
  211.           the disk, analyzes this data and then waits for you to press the
  212.           <Enter> key before proceeding to unfragment the drive. If you did
  213.           not copy the configuration file, ORG will warn you of this and
  214.           will use its own internal default settings.  You may view these
  215.           defaults and the configuration settings by pressing the <F1> key.
  216.           If you decide you don't want to run ORG right now, press <Escape>,
  217.           and ORG will return you to the DOS environment.
  218.  
  219.           If you have used other unfragmentation programs before, the
  220.           screen layout with the large symbolic map of your disk will look
  221.           familiar.  The available commands are shown in the highlighted
  222.           box on the right of the disk-map window.
  223.  
  224.           ORG can take anywhere from a few seconds to several minutes to
  225.           unfragment your disk.  Typically, it will take 1 to 2 minutes
  226.           to unfragment a 32MB partition with about 20MB of data.  You may
  227.           abort ORG at any time by simply pressing the <Escape> key.  The
  228.           integrity of your data is guaranteed if you exit in this manner.
  229.  
  230.           After optimization is completed, ORG will ask whether you wish to
  231.           re-boot the system.  Certain resident programs retain information
  232.           about the previous state of the disk.  Unless you are sure that
  233.           you have no such programs in your system, you should type "Y" to
  234.           allow ORG to initiate a system reset. (The re-boot query is not
  235.           displayed if you have used ORG on a removeable diskette).
  236.  
  237.  
  238.  
  239.  
  240.  
  241.                                        Page 4
  242.           
  243.           Documentation for ORG V:2.0         Copyright 90/91, M.H. Greve
  244.  
  245.  
  246.  
  247.  
  248.           Laptop users:
  249.           -------------
  250.  
  251.           If you are running ORG on a laptop computer you may find the
  252.           display difficult to read.  This is because Laptops often emulate
  253.           color displays on the built in monochrome screen, making certain
  254.           colors hard to distinguish.  In such cases, re-start ORG using
  255.           the /L command line switch which forces ORG to use its monochrome
  256.           display settings irrespective of the type of video adaptor in-
  257.           stalled  (see chapter 5: Command Line Switches).
  258.  
  259.           WARNING!
  260.           --------
  261.  
  262.           NEVER re-boot or switch off the computer while ORG is running, as
  263.           this may cause loss of data. As a precaution, it is a good idea
  264.           to run ORG after you have made a backup of your hard disk,
  265.           particularly if you live in an area where power dips are common.
  266.  
  267.  
  268.  
  269.        3. ABOUT ORG
  270.        ------------
  271.  
  272.           You may run ORG on any valid drive in your system. This may be
  273.           a floppy, a hard disk, or a logical partition on your hard disk.
  274.           ORG cannot (and should not) run on virtual (RAM) drives or Network
  275.           drives and will issue a warning if you specify one accidentally.
  276.           If your computer is equipped with an EGA or VGA screen, ORG will
  277.           detect when the screen is set to 43/50 line and automatically use
  278.           the full screen display.  You may force ORG to display in either
  279.           25-line or 43/50-line mode by using the appropriate command line
  280.           switches (see Chapter 5).  If available, ORG will use expanded or
  281.           extended memory for its tables and buffers.  It requires the EMS
  282.           driver version 3.2 or above to access expanded memory.  Extended
  283.           memory is accessed either directly or through the Microsoft XMS
  284.           interface (HIMEM.SYS) if the latter is detected in your system.
  285.  
  286.  
  287.           How ORG works:
  288.           --------------
  289.  
  290.           After you start ORG, the program reads any command line options
  291.           and then searches for the configuration file ORG.CFG. ORG searches
  292.           for this file in the root directory of the target drive you
  293.           specified and then in the drive/directory from which ORG was
  294.           loaded.  This somewhat restrictive search ensures good control
  295.  
  296.                                        Page 5
  297.           
  298.           Documentation for ORG V:2.0         Copyright 90/91, M.H. Greve
  299.  
  300.  
  301.  
  302.  
  303.           over the configuration file used and prevents ORG from acciden-
  304.           tally loading an old version that may be "visible" in your DOS
  305.           PATH.  ORG.CFG contains a list of special commands that allow you
  306.           to control the way in which ORG organizes the files on your disk.
  307.           (Refer to chapter 4: The Configuration File).
  308.  
  309.           ORG reads and analyses the parameters, directory structure and
  310.           FAT (File Allocation Table) of the drive and processes the
  311.           "delete" and "sort" command functions in memory, WITHOUT writing
  312.           to your hard disk.  ORG pauses at this stage and waits for you to
  313.           press the <Enter> key before beginning to organize the files.  If
  314.           you abort the program by pressing the <Esc> key at this stage, no
  315.           data on the disk will have been modified.
  316.  
  317.           By pressing the <F1> key you can view the configuration settings
  318.           before proceeding, to assure yourself that ORG will perform the
  319.           desired functions.
  320.  
  321.           Once ORG has started organizing the drive, you can still safely
  322.           interrupt the process any time by pressing the <Esc> key. The
  323.           consistency and integrity of your files is guaranteed if you exit
  324.           ORG in this way, however ALL files which you flagged for deletion
  325.           will have been erased.
  326.  
  327.           WARNING: NEVER power off or re-boot your computer while ORG is
  328.                    running as this may cause loss of data integrity which
  329.                    can be very difficult to recover even with programs such
  330.                    as the Norton (TM) Utilites.
  331.  
  332.  
  333.           While ORG runs, it displays its progress on a disk-map in a window
  334.           of your screen.  In this map, each visible block corresponds to
  335.           one or more physical clusters on the drive.  The blocks that have
  336.           already been processed are highlighted.  Special symbols are used
  337.           to indicate locked or bad clusters.  The blocks being moved are
  338.           highlighted with an 'r' (read) or 'W' (write).  Note that ORG will
  339.           always move the largest possible contiguous block of clusters.  If
  340.           it can, it will move them to the final destination immediately. If
  341.           not, it will write them to the end of the disk temporarily.  This
  342.           process is very efficient since it ensures that each cluster on
  343.           the disk is never moved more than twice in a session.
  344.  
  345.           Frequently, ORG will detect that it already has the clusters it
  346.           needs in memory and will not re-read them.  This feature not only
  347.           saves time, but also prevents a lot of unnecessary "head-
  348.           thrashing" action.
  349.  
  350.  
  351.  
  352.                                        Page 6
  353.           
  354.           Documentation for ORG V:2.0         Copyright 90/91, M.H. Greve
  355.  
  356.  
  357.  
  358.  
  359.           ORG updates the FAT and directory areas after writing each group
  360.           of blocks, ensuring disk integrity as far as technically possible.
  361.           In fact, loss of data is only possible during the relatively
  362.           short time when the directories and FAT are "out of synch".  This
  363.           is important because ORG will retain data integrity at all other
  364.           times, even if a power dip were to occur during a "write" to the
  365.           data area.
  366.  
  367.           You will notice that ORG often appears to read or write to a
  368.           protected area or an area that has already been processed. This
  369.           is normal and is because each block usually represents several
  370.           clusters.
  371.  
  372.           The highlighted box to the right of the disk-map displays the
  373.           currently available command(s).  A "percent completed" counter
  374.           above this box keeps track of ORG's progress.
  375.  
  376.  
  377.           File order and sequence:
  378.           ------------------------
  379.  
  380.           By default, ORG skips all system files and places all directories
  381.           first on the disk.  The sequence in which ORG places remaining
  382.           files on the disk is determined by the sequence in which it
  383.           encounters the file name entries in the (sub)directories.  You
  384.           may override or modify these default settings by using the "sort"
  385.           and "order" commands in the configuration file, ORG.CFG (see
  386.           Chapter 4: The Configuration File).
  387.  
  388.           If you were to compare the result of organizing a disk under ORG
  389.           with that of other similar programs, you might find that some
  390.           programs will start organizing the disk over again.  This does not
  391.           mean that ORG failed to optimize your disk, it merely indicates
  392.           that there is more than one valid way (and no right way) to
  393.           organize directories and files on the disk.
  394.  
  395.  
  396.  
  397.        4. THE CONFIGURATION FILE
  398.        -------------------------
  399.  
  400.           The features available to you through use of the configuration
  401.           file make ORG the most powerful and versatile Disk Organizer
  402.           available today.
  403.  
  404.  
  405.  
  406.                                        Page 7
  407.           
  408.           Documentation for ORG V:2.0         Copyright 90/91, M.H. Greve
  409.  
  410.  
  411.  
  412.  
  413.           The configuration file is an ASCII text file containing special
  414.           ORG commands, similar to a DOS batch file. When you run ORG
  415.           without specifying a configuration file name, it searches for
  416.           the ORG.CFG file in the root directory of the target drive you
  417.           selected when you started the program and then in the drive/path
  418.           where the ORG.EXE program resides.  This restrictive search
  419.           lets you keep a customized configuration file for each drive in
  420.           the root directory of your hard disk.
  421.  
  422.           NOTE:
  423.           Under DOS versions earlier than 3.0, ORG will search for the
  424.           configuration file in the current default directory (CWD) instead
  425.           of in the directory from which ORG.EXE was loaded.
  426.  
  427.           ORG allows you to override the default name of the configuration
  428.           file (ORG.CFG), by simply specifying a file name of the form
  429.           "/@[d:][\pathspec\]filename" on the ORG command line. If you only
  430.           specify a filename, ORG will search the root directory of the
  431.           target drive and directory where the ORG.EXE program resides.
  432.           The configuration filespec must be immediately preceded by the
  433.           "@" sign.
  434.  
  435.           ORG.CFG uses a simple command structure similar to that used in
  436.           compiler MAKE files.  A sample configuration file (ORG.CFG) is
  437.           included in the ORG package. Each line in the configuration file
  438.           represents a command for ORG.  The command syntax is:
  439.  
  440.           <function> [\path\][filename]  [qualifier]  [#<comment>]
  441.  
  442.           The first element on each line is the function to be performed.
  443.           This is followed by a file specifier in the form "path\filename".
  444.           Each command can take a qualifier that tells ORG which file
  445.           attributes are to be used to further specify the file(s). If you
  446.           specified the "sort" command (see below), the qualifier has a
  447.           different meaning: it indicates the type and sequence of the sort
  448.           keys.
  449.  
  450.  
  451.           Here are a few examples of valid commands:
  452.  
  453.           lock     *.* +s           # lock all system files
  454.           delete   \TEMP\*.back     # delete all .BACK files
  455.           sort     +n-t             # sort by filename, newest files first
  456.           order    *.EXE            # place all .EXE files first
  457.  
  458.  
  459.  
  460.  
  461.                                        Page 8
  462.           
  463.           Documentation for ORG V:2.0         Copyright 90/91, M.H. Greve
  464.  
  465.  
  466.  
  467.  
  468.           In the following you will find a detailed description of each
  469.           element of the configuration command:
  470.  
  471.  
  472.           Commands:
  473.           ---------
  474.  
  475.           lock -   prevents ORG from moving a specified file or group of
  476.                    files on the drive. This is essential to avoid moving
  477.                    files such as your DOS system files on the bootable
  478.                    partition of your disk.  It may also be necessary to
  479.                    lock the identification files used by certain copy-
  480.                    protected software. The "lock" function takes an optional
  481.                    attribute parameter.  ORG's default setting locks all
  482.                    "system" files.  You may disable this default setting
  483.                    using the /nod command line option.
  484.  
  485.  
  486.           sort -   allows you to sort the contents of the directory in
  487.                    ascending or descending order by filename, extension,
  488.                    date & time, or size. A sort is always performed on an
  489.                    entire directory; if a filename is given, it is ignored
  490.                    by ORG for the sort operation. The qualifier determines
  491.                    the type and sequence of the sort operation.
  492.  
  493.                    The command always places subdirectories first and then
  494.                    sorts directory names and filenames in two consecutive
  495.                    passes.
  496.  
  497.                    Note:  ORG processes directories and files in the order
  498.                    in which they are encountered.  Using the "sort" command
  499.                    thus affects the sequence in which ORG will place the
  500.                    files on the drive.  The "order" command described below
  501.                    allows you to override this sequence by specifying that
  502.                    certain files (or groups of files) be processed first.
  503.  
  504.  
  505.       order -  allows you to force certain files, or groups of files
  506.                    (specified using DOS style wild selections) to be placed
  507.                    first on the disk.  If you use several "order" commands,
  508.                    they are processed in the sequence in which they appear
  509.                    in the configuration file.  If a group of files is
  510.                    specified, they are processed in sequence, by directory
  511.                    and in the sequence in which they appear in the directory
  512.                    structure.
  513.  
  514.  
  515.  
  516.                                        Page 9
  517.           
  518.           Documentation for ORG V:2.0         Copyright 90/91, M.H. Greve
  519.  
  520.  
  521.  
  522.  
  523.                    Do not confuse this command with the "sort" command
  524.            described above, which sorts directory and file names
  525.            and thus implicitly determines the sequence of files.
  526.  
  527.            As with the lock and delete options, you may specify one
  528.            or more file attributes as qualifiers for the path\
  529.            filename spec.  Note that ORG's default settings will
  530.            place all directories first on the disk (behind the
  531.                    system files and/or the Volume identifier).  You may
  532.            disable this default setting using the /nod command line
  533.                    option.
  534.  
  535.           delete - allows you to specify a file or group of files that you
  536.                    wish to delete from the drive.  For example, you might
  537.                    want to delete .BAK or .TMP files on your drive prior to
  538.                    unfragmenting. The default setting only allows ORG to
  539.                    delete normal files that is, files that have either no
  540.                    attributes or only the "archive" attribute set.  You may
  541.                    override this default by explicitly specifying one or
  542.                    more file attributes.
  543.  
  544.                    NOTE: Use this command with care, because if you
  545.                    accidentally delete a file with ORG, you will NOT be able
  546.                    to "un-erase" it any more later! For this reason, ORG
  547.                    will ignore a command to delete all files on the disk.
  548.                    ORG will also ignore requests to delete directories.
  549.  
  550.           The order in which commands are executed by ORG is fixed in the
  551.           program. Irrespective of where they appear in the configuration
  552.           file, commands are processed in the following sequence:
  553.  
  554.                 1.  lock
  555.                 2.  delete
  556.                 3.  sort
  557.                 4.  order
  558.  
  559.           Because any "lock" commands are processed first, they will take
  560.           precedence over "delete" commands that occur later, ie. ORG will
  561.           NOT delete files that have been "frozen" by a previous lock
  562.           command.
  563.  
  564.           If several similar commands occur, they are processed in the order
  565.           in which they appear in the configuration file, eg:
  566.  
  567.             order  \command.com
  568.             order  *.COM
  569.             order  *.EXE
  570.  
  571.                                        Page 10
  572.  
  573.        Documentation for ORG V:2.0            Copyright 90/91, M.H. Greve
  574.  
  575.  
  576.  
  577.  
  578.           The Path/Filename Specifier:
  579.           ----------------------------
  580.  
  581.           The second element in a command is the filename specifier. This
  582.           element follows MS-DOS conventions for directory and filenames.
  583.           You may specify any valid path (commands with invalid paths are
  584.           ignored; no error message is generated).
  585.  
  586.           The filename may contain the "wild-card" symbols '*' and '?'. The
  587.           filename may be omitted entirely if the pathname is terminated
  588.           by a backslash (\). ORG will then assume you specified all files
  589.           in this directory.  The following are some examples of valid
  590.           filename specifiers:
  591.  
  592.           delete   \brief\backup\   # delete all files in \BRIEF\BACKUP
  593.           order    \*.WK1           # place all Lotus 2.xx files first
  594.           delete   *.tmp  +r        # delete .TMP files, including read-only
  595.  
  596.           Note that the path\filename specifier is optional, however it may
  597.           only be omitted if you provide a qualifier on the line. This means
  598.           you must EITHER include a filename OR a qualifier (see below) and
  599.           may not omit both; a command containing a function only is
  600.           flagged as an error.
  601.  
  602.  
  603.  
  604.           The Command Qualifier:
  605.           ----------------------
  606.  
  607.           The qualifier has two functions.  For the "lock", "delete" and
  608.           "order" options it specifies the desired file attributes. For the
  609.           "sort" option, it defines the type, sequence and order (ascending
  610.           or descending) of sorting.  The qualifier is always optional.
  611.           Valid file attribute qualifiers are:
  612.  
  613.               +r        # Read-only files
  614.               +h        # Hidden files
  615.               +s        # System files
  616.               +d        # subdirectories
  617.               +a        # archive files
  618.  
  619.           A '+' (plus) or '-' (minus) sign must precede the attribute.  The
  620.           sign is used solely as a separator between consecutive attributes
  621.           and has no other meaning: it does NOT qualify the attribute. Both
  622.           signs are allowed for consistency with the sort qualifiers
  623.           described below and for possible future enhancement.  Attributes
  624.           may be combined on a command line. Some attributes are invalid
  625.  
  626.                                        Page 11
  627.           
  628.        Documentation for ORG V:2.0            Copyright 90/91, M.H. Greve
  629.  
  630.  
  631.  
  632.  
  633.           for certain commands and are ignored.  For example, the command
  634.           "delete *.* +d" will NOT cause subdirectories to be deleted.
  635.  
  636.           File attributes are of little or no significance in file sorting
  637.           operations.  The meaning of the qualifier is therefore quite
  638.           different for the "sort" option.  The four sort qualifiers
  639.           determine the type and order of the sort.  The following are valid
  640.           "sort" qualifiers:
  641.  
  642.               +n | -n   # sort by name
  643.               +e | -e   # sort by extension
  644.               +t | -t   # sort by date/time field
  645.               +s | -s   # sort by file size
  646.  
  647.           The sign preceding the qualifier acquires meaning in that it now
  648.           determines the direction of the sort, viz. ascending (+) or
  649.           descending (-) order.  You may specify multiple sort options; the
  650.           sequence of qualifiers determines the sort order.  Sorts are
  651.           performed on the entire directory, ie. any filenames you specify
  652.           are ignored. The following sort commands are identical:
  653.  
  654.               sort  \DOCS\*.DOC  +e-s
  655.               sort  \DOCS\*.*    +e-s
  656.               sort  \DOCS\       +e-s
  657.  
  658.           They each cause all files in the \DOCS subdirectory to be sorted
  659.           in ascending order by extension, placing the largest files first.
  660.  
  661.           Note that some combinations of sort qualifiers are mutually
  662.           exclusive: a sort by name, extension AND size is meaningless
  663.           because all files are uniquely defined by 'filename.ext'.
  664.           Similarly, subdirectories cannot be sorted by size.
  665.  
  666.  
  667.           Commenting the configuration file:
  668.           ---------------------------------
  669.  
  670.           You may include comments in the configuration file to help you
  671.           document your commands.  Comments must be preceded by a '#' sign.
  672.           They may be placed after a command or on a separate line in the
  673.           configuration file.  If comments are placed after a command, you
  674.           must leave at least one blank space (or TAB) behind the command.
  675.  
  676.             order *.COM           # This is a comment following a command.
  677.             # Comments are also allowed on empty lines.
  678.  
  679.  
  680.  
  681.                                        Page 12
  682.           
  683.        Documentation for ORG V:2.0            Copyright 90/91, M.H. Greve
  684.  
  685.  
  686.  
  687.  
  688.        5. COMMAND LINE SWITCHES
  689.        ------------------------
  690.  
  691.           ORG supports a small set of command line switches that control
  692.           ORG's global settings.  The complete command line is shown here:
  693.  
  694.           ORG [d:] [/a] [/e] [/q] [/f] [/d] [/l] [/25|/50] [/h]
  695.               [/nod] [/sim] [/nox] [/@configfile]
  696.  
  697.           where:
  698.  
  699.           d:      is any valid drive specifier (A: - Z:).
  700.  
  701.           /a      Automatic mode: ORG runs without pausing for confirmation
  702.                   and exits to DOS without pausing at the end of the run.
  703.                   This option will also suppress the re-boot query message
  704.                   normally displayed by ORG at the end of each run.
  705.  
  706.           /e      Exit to DOS: At the end of each run, ORG will normally
  707.                   display a query message, asking if you wish to re-boot
  708.                   your system to reset any programs which may have retained
  709.                   information about the drive's previous state.  The /e
  710.                   option suppresses this message and causes ORG to exit to
  711.                   DOS immediately.  (The re-boot query is not displayed if
  712.                   you have used ORG on a removeable diskette).
  713.  
  714.           /q      Silent mode: disables sound.
  715.  
  716.           /f      Full ORG: This option causes ORG to sort all files on the
  717.                   drive in the sequence in which they are encountered in
  718.                   the directories. You can modify this sequence by either
  719.                   sorting the directory contents or explicitly specifying
  720.                   which files are to be placed on the drive.
  721.                   (See Chapter 4: The Configuration File).
  722.  
  723.           /d      Directories only: ORGanizes directories only.
  724.  
  725.           /l      Laptop mode: forces a monochrome display on laptops that
  726.                   emulate color video adaptors.
  727.  
  728.           /25     Forces ORG to use a 25 line (text) display, irrespective
  729.                   of the initial display mode.  Use either /25 or /50.
  730.  
  731.           /50     Forces ORG to use the 43-line (EGA) or 50-line (VGA)
  732.                   display, irrespective of the initial display mode.  Use
  733.                   either /25 or /50.
  734.  
  735.  
  736.                                        Page 13
  737.           
  738.        Documentation for ORG V:2.0            Copyright 90/91, M.H. Greve
  739.  
  740.  
  741.  
  742.  
  743.           /h      Help: This switch overrides all others and simply causes
  744.                   a list of all available options to be displayed.
  745.  
  746.           /sim    Simulation mode: Selecting this option will allow you to
  747.                   test ORG on unknown systems without actually writing to
  748.                   the disk.  All other functionality remains unaffected.
  749.                   The message "Simulaton" is displayed in the lower right
  750.                   corner of the screen.
  751.                   This option can be very useful if you are trying to
  752.                   optimize your system and would like to add TSR programs
  753.                   which you think may work with ORG.
  754.  
  755.           /nod    No defaults: turns off all default configuration options.
  756.                   ORG's default configuration locks system files and places
  757.                   directories first on the drive.  Disabling these defaults
  758.                   may cause certain otherwise unmovable system files to be
  759.                   moved and should only be used by experienced users. You
  760.                   will have to enter every option explicitly.
  761.                   The /nod option may be used to make room for, or replace
  762.                   the system files on the bootable drive without recourse
  763.                   to the DOS SYS command.
  764.  
  765.                   WARNING:  Use the "/nod" switch with great care,
  766.                   particularly on your bootable drive (C:).
  767.  
  768.           /nox    Do NOT use Extended/Expanded meory. Forces use of
  769.                   conventional (DOS) memory only.
  770.  
  771.           /@fname Used to specify an alternate path\filename to override
  772.                   the default configuration file name (ORG.CFG).
  773.                   Example: "ORG /@MYCONFIG.CFG"
  774.  
  775.  
  776.           Switches may be used alone or together (except /h) and may be
  777.           placed in any order on the command line.  Blank separators are
  778.           optional except before the drive specifier.  You may use a UNIX
  779.           style dash '-' as a delimiter if you prefer. Thus any of the
  780.           following commands are valid:
  781.  
  782.  
  783.                 ORG /q/a A: /sim
  784.                 ORG C: -nod -l
  785.                 ORG /a/l A:-nod -@D:\MYDIR\MYCONFIG.CFG
  786.  
  787.  
  788.  
  789.  
  790.  
  791.                                        Page 14
  792.           
  793.        Documentation for ORG V:2.0            Copyright 90/91, M.H. Greve
  794.  
  795.  
  796.  
  797.  
  798.        6. LIMITATIONS AND RESTRICTIONS
  799.        -------------------------------
  800.  
  801.           Operating System:
  802.           -----------------
  803.  
  804.           ORG requires MS-DOS 2.1 or higher to run. It must NOT be run
  805.           under a multitasking Environment such as OS/2, Windows, DesqView
  806.           or Software Carousel because you can never be sure that other
  807.           programs are not using any of the files on the drive that ORG is
  808.           processing.  ORG will refuse to run under Windows or DesqView.
  809.           Popular memory management enhancers for 80386 processors such as
  810.           386MAX and QEMM are however compatible with ORG.
  811.  
  812.  
  813.           RAM- and Network drives:
  814.           ------------------------
  815.  
  816.           ORG will not run with RAM drives or Network drives.  If the
  817.           program detects either of these two devices, it will abort with
  818.           an appropriate error message.
  819.  
  820.  
  821.           Large partition support:
  822.           ------------------------
  823.  
  824.           ORG places no restrictions on the size of the drive and will
  825.           handle volumes greater than 32MB if you are using MS-DOS 4 or
  826.           higher or Compaq DOS 3.31.  The only limit is the amount of free
  827.           memory in your system: there must be enough room for ORG to keep
  828.           a complete copy of the directory structure resident in memory.
  829.           If extended or expanded memory is used, there are NO practical
  830.           restrictions to the partition size ORG can handle.
  831.  
  832.  
  833.           Compatibility:
  834.           --------------
  835.  
  836.           Certain of ORG's options may change the order of files on your
  837.           disk and/or delete files without using DOS functions. Certain
  838.           disk utilities such as QDOS or the PC-TOOLS UNERASE or DOS's
  839.           FASTOPEN may retain information about the drive's previous state.
  840.           As a result, these programs may fail to operate correctly after
  841.           ORG has been run.  At the end of each run, ORG will query if you
  842.           want to re-boot the system in order to reset these programs'
  843.           buffers.  Unless you are quite sure that you are not using any
  844.           programs of this type, you should always allow ORG to re-boot the
  845.  
  846.                                        Page 15
  847.           
  848.        Documentation for ORG V:2.0            Copyright 90/91, M.H. Greve
  849.  
  850.  
  851.  
  852.  
  853.  
  854.           computer.  Use the /e command line option to suppress ORG's
  855.           re-boot query message.  A System Reset is normally required only
  856.           for hard disks.  Thus, if you have used ORG on a removeable
  857.           diskette, the query message is not displayed.
  858.  
  859.           If you are using utilities which maintain a reference file with
  860.           disk status information, you may have to re-run these programs to
  861.           force them to rebuild the database.
  862.  
  863.           There are no other known incompatibilities with ORG.  Many
  864.           resident programs such as popular disk cache programs will not
  865.           interfere with ORG's operation, however you should avoid running
  866.           ORG in the presence of such resident utilites unless you
  867.           understand their function well and test them carefully first!
  868.  
  869.  
  870.        7. ACKNOWLEDGMENT
  871.        -----------------
  872.  
  873.           The original idea for ORG is by David Rifkind, Newbury Park, CA.
  874.           Dave's "cluster-mover" concept is largely responsible for the
  875.           awesome speed with which ORG unfragments your hard disk! I am
  876.           very grateful to Dave for having donated me his code, without
  877.           which I doubt I would have been able to complete ORG.
  878.  
  879.  
  880.  
  881.  
  882.  
  883.                                        Page 16
  884.           
  885.        Documentation for ORG V:2.0            Copyright 90/91, M.H. Greve
  886.  
  887.  
  888.  
  889.  
  890.        APPENDIX A - PROGRAM TERMINATION CODES
  891.        --------------------------------------
  892.  
  893.           When ORG finishes a run, it sets the system ERRORLEVEL code
  894.           before exiting to DOS.  You may use these codes to determine
  895.           whether or not ORG completed the pass successfully and glean
  896.           some information about the cause of an abnormal termination,
  897.           for example if you are running ORG from a batch file.
  898.  
  899.           ORG generates the following ERRORLEVEL codes:
  900.  
  901.           ERRORLEVEL
  902.  
  903.               0  -  Normal program termination.
  904.  
  905.               1  -  Program aborted by user. Issued when you interrupt
  906.                     execution with the <ESC> key or exit in response to
  907.                     a warning error message.
  908.  
  909.               2  -  Bad option on ORG command line
  910.  
  911.              -1  -  All other errors and abnormal end conditions.
  912.  
  913.  
  914.  
  915.  
  916.        APPENDIX B - ERROR MESSAGES
  917.        ---------------------------
  918.  
  919.           If an error occurs, ORG will generate one of three types of error
  920.           messages.
  921.  
  922.           User Errors:
  923.           ------------
  924.  
  925.           These will warn you of operating problems that are usually fairly
  926.           easy to correct, such as the use of an invalid drive letter or
  927.           that there is not enough memory for ORG to run. The following is
  928.           a list of "User Errors". Most messages are self-explanatory.
  929.  
  930.            1. "There is insufficient DOS memory for ORG to run. Remove
  931.                resident programs to increase available memory.
  932.  
  933.  
  934.            2. "Request for Expanded Memory failed. ORG requires at least
  935.                16K LIM 3.2 Expanded Memory per megabyte of data on your
  936.                disk to run.
  937.  
  938.            3. "Request for XMS Extended Memory failed. ORG requires at
  939.                least 16K XMS Extended Memory per megabyte of data on your
  940.                disk to run.
  941.  
  942.            4. "There are too many options in the configuration file.
  943.                ORG is limited to 50 configuration options."
  944.  
  945.            5. "The sector size of this disk is not 512 bytes. Under DOS
  946.                versions 2, ORG works only on disks with 512-byte sectors."
  947.  
  948.  
  949.  
  950.  
  951.                                        Page 17
  952.           
  953.        Documentation for ORG V:2.0            Copyright 90/91, M.H. Greve
  954.  
  955.  
  956.  
  957.  
  958.            6. "The boot record of this disk does not contain an
  959.                MS-DOS signature. This may not be a DOS disk.
  960.                       Continue anyway ? [Y/N]
  961.  
  962.            7. "The specified drive identifier is not known to your
  963.                system.  Re-try with a valid drive identifier."
  964.  
  965.            8. "The specified drive is probably RAM-drive or Network
  966.                drive.  ORG should only be used on local disks!
  967.                       Continue anyway ? [Y/N]
  968.  
  969.            9. "The boot record of this disk shows an invalid number
  970.                of sectors."
  971.  
  972.           10. "The media descriptor in this disk's file allocation
  973.                table does not match the one in the boot record."
  974.  
  975.           11. "The file allocation table has a bad link entry."
  976.  
  977.  
  978.           12. "There are cross-linked clusters on this disk."
  979.  
  980.  
  981.           13. "There is not enough free space on this disk for
  982.                ORG to work. You may need to delete some files."
  983.  
  984.  
  985.           14. "A cluster being used by a file is marked as available
  986.                in the file allocation table."
  987.  
  988.  
  989.           15. "A cluster being used by a file is marked as bad
  990.                in the file allocation table."
  991.  
  992.  
  993.           16. "There are lost clusters on this disk.
  994.  
  995.  
  996.           17. "A subdirectory contains a bad entry."
  997.  
  998.  
  999.           18. "Cluster allocation error(s) found."
  1000.  
  1001.                                        Page 18
  1002.           
  1003.        Documentation for ORG V:2.0            Copyright 90/91, M.H. Greve
  1004.  
  1005.  
  1006.  
  1007.  
  1008.           Notes:
  1009.           (i)    Errors 2 through 4 occur when ORG attempts to allocate
  1010.                  Expanded or Extended memory.  If you are suree you have
  1011.                  sufficient Extended or Expanded memory for ORG to run
  1012.                  successfully but still get one of these error messages,
  1013.                  please contact the author. You may still be able to use
  1014.                  ORG by using the /c command line switch to force ORG to
  1015.                  use conventional DOS memory only.
  1016.  
  1017.           (ii)   Error 7 frequently occurs when you attempt to ORGanize a
  1018.                  RAM drive.
  1019.  
  1020.           (iii)  Errors 11, 12, 14, 15, 16, 17 and 18 can usually be
  1021.                  corrected with DOS's CHKDSK program (see your MS-DOS User's
  1022.                  Guide for a detailed description of the CHKDSK command).
  1023.  
  1024.           (iv)   Error 8 may indicate a serious problem with the drive.
  1025.                  Normally the problem can be fixed with a disk utility
  1026.                  such as the "Norton Disk Doctor" (TM).
  1027.  
  1028.           (v)    Errors 4 and 6 are warning errors only. You may force
  1029.                  ORG to continue by answering "Y" at the prompt.
  1030.  
  1031.  
  1032.           Disk Errors:
  1033.           ------------
  1034.  
  1035.           All Disk Errors reported by ORG are serious errors that may
  1036.           indicate a deterioration of your hard disk.  They are always
  1037.           caused by a failure to read or write to a given sector on the
  1038.           disk. Depending on where and when they occurred, these errors may
  1039.           be recoverable.  If the bad sector is in the FAT (File Allocation
  1040.           Table) area of your disk, you risk losing data.
  1041.  
  1042.           If ORG reports a DISK ERROR, exit and run DOS's CHKDSK program to
  1043.           verify the error and then run a disk diagnostics/repair program
  1044.           to recover as much data as possible and try to restore the files
  1045.           from your backup.
  1046.  
  1047.           If ORG reports a "FATAL" error, it has failed during an attempt
  1048.           to update the FAT or root directory areas.  In this case, there
  1049.           is a serious risk of losing a significant amount of data.
  1050.  
  1051.           All disk errors return the DOS internal number of the error (xxxx)
  1052.           and the number (nnnn) of the sector that caused the problem.  If
  1053.           a FAT write error occurred in FAT #2, it is very likely you will
  1054.  
  1055.  
  1056.                                        Page 19
  1057.           
  1058.        Documentation for ORG V:2.0            Copyright 90/91, M.H. Greve
  1059.  
  1060.  
  1061.  
  1062.  
  1063.           able to recover all your data.  The following messages may be
  1064.           reported by ORG in the event of a disk access error:
  1065.  
  1066.            1. "Recoverable error #xxxx,
  1067.                reading sector #nnnn in the data area."
  1068.  
  1069.            2. "Recoverable error #xxxx,
  1070.                writing sector #nnnn in the data area"
  1071.            3. "CRITICAL error #xxxx, reading sector #nnnn in FAT #m.
  1072.                The Disk may be unusable."
  1073.  
  1074.            4. "FATAL error #xxxx, writing sector #nnnn in FAT #m.
  1075.                Data may be destroyed!"
  1076.  
  1077.            5. "CRITICAL error #xxxx, reading sector #nnnn in the ROOT area.
  1078.                The Disk may be unusable."
  1079.  
  1080.  
  1081.            6. "FATAL error #xxxx, writing sector #nnnn in the Root area.
  1082.                Data may be destroyed!"
  1083.  
  1084.  
  1085.            Internal Errors:
  1086.            ----------------
  1087.  
  1088.            This last category of errors should NEVER occur. They are always
  1089.            associated with programming bugs and have been included solely
  1090.            to help with debugging. If you ever get an "Internal Error",
  1091.            please report it immediately and I will try and find the cause
  1092.            of the problem.
  1093.  
  1094.  
  1095.  
  1096.  
  1097.        APPENDIX C - BUGS
  1098.        -----------------
  1099.  
  1100.           Although ORG has been tested thoroughly, I cannot guarantee that
  1101.           it is truly free of bugs.  If you encounter what you believe to
  1102.           be a bug in ORG, you should try the following steps before calling
  1103.           or sending in a "Bug Report":
  1104.  
  1105.           Remove all TSR programs from your system, especially programs such
  1106.           as disk cache software or RAM drives or, better still, re-boot the
  1107.           computer from a "virgin" DOS diskette and try to run ORG again. If
  1108.           ORG runs in this environment but not in your normal DOS
  1109.           environment, try reconstructing the system under which ORG failed
  1110.  
  1111.                                        Page 20
  1112.           
  1113.        Documentation for ORG V:2.0            Copyright 90/91, M.H. Greve
  1114.  
  1115.  
  1116.  
  1117.  
  1118.           by adding drivers and TSR's one by one until the problem re-
  1119.           appears.  If you find the particular software which causes the
  1120.           trouble, please let me know about it, so that I can warn other
  1121.           users and try to find a "workaround" and send you an upgrade.
  1122.  
  1123.           If the above approach does not work, please send me a detailed
  1124.           report including a full description of your system and I will
  1125.           try to help you find the problem.
  1126.  
  1127.  
  1128.  
  1129.  
  1130.        ORG - REGISTRATION
  1131.        ------------------
  1132.  
  1133.           Please complete the attached form and return it with US$30.00
  1134.           (or US$45.00 if you want full Microsoft C source code and object
  1135.       libraries).  Send cash by registered air-mail. Send checks by
  1136.           regular air-mail. (add $3.- for check handling charges outside
  1137.           of North America).
  1138.  
  1139.  
  1140.       If you live in the US or Canada, please send your registration
  1141.       to:
  1142.  
  1143.                          David Rifkind
  1144.                          1800, Hillcrest Drive #287
  1145.                          Newbury Park, CA 91320
  1146.                          (USA)
  1147.  
  1148.  
  1149.       If you are registering from outside North America, please send
  1150.       your registration to:
  1151.  
  1152.                          Michael H. Greve
  1153.                          Aubrigstrasse 23
  1154.                          CH 8804 AU
  1155.                          Switzerland
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.                        ORG version 2.4 - REGISTRATION FORM
  1163.                        -----------------------------------
  1164.  
  1165.           Last Name:__________________________  Other Names:________________
  1166.  
  1167.           Address:____________________________  Town/City:__________________
  1168.  
  1169.           State or Country:___________________  Telephone:__________________
  1170.  
  1171.           Post Code:________
  1172.  
  1173.  
  1174.           I wish to receive the full Microsoft C source code:_______________
  1175.           (including object library of support functions)
  1176.  
  1177.           I enclose a check (___), cash (___) for $_________________________
  1178.  
  1179.           I understand that this software is supplied without warranty,
  1180.           express or implied, and agree not to hold its author liable for
  1181.           any direct or consequential loss arising out of my use of it.
  1182.  
  1183.           Signature:______________________________
  1184.  
  1185.           ------------------------------------------------------------------
  1186.           Please also answer the following questions. They may help in
  1187.           diagnosing your problems and provide the author with some
  1188.           statistical data on ORG users.
  1189.  
  1190.           On what type(s) of computer are you using ORG ? __________________
  1191.  
  1192.           CPU (8088, 8086, etc.)? __________   Amount of RAM (kB)? _________
  1193.  
  1194.           Type & Size of Hard Disk(s)? _____________________________________
  1195.  
  1196.           Make and Type of Hard Disk Controller(s)? ________________________
  1197.  
  1198.           How did you obtain/hear about this program?
  1199.  
  1200.           Did you think that the registration fee for this program was:
  1201.  
  1202.           Very Good Value_________  About Right________  Too High___________
  1203.  
  1204.           What did you think of the documentation provided with ORG ?
  1205.  
  1206.           Very Good_______________  Adequate___________  Inadequate_________
  1207.  
  1208.           Comments & suggestions:___________________________________________
  1209.  
  1210.           __________________________________________________________________
  1211.  
  1212.       __________________________________________________________________
  1213.  
  1214.       __________________________________________________________________
  1215.  
  1216.