home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / DOS_HELP / CHG22.ZIP / CHG.DOC next >
Encoding:
Text File  |  1991-02-01  |  7.4 KB  |  191 lines

  1.                              CHG 2.2
  2.  
  3.                        A Program to Change
  4.                 File Attributes, Dates, and Times
  5.                              - and -
  6.                      Hide/Unhide directories
  7.  
  8.                                 by
  9.                              Bob Eyer
  10.                            [73230,2620]
  11.  
  12.                             Feb 1, 1991
  13.  
  14.  
  15.      Syntax:
  16.  
  17.      CHG Filespec|Directory [option-string]
  18.  
  19.          The option-string may be:
  20.          -  an attribute or combination thereof
  21.          -  a date
  22.          -  a time
  23.          (see discussion below)
  24.  
  25.      Execution  of  CHG  without  parameters  generates  a  useful help
  26.      screen, returning a DOS error level of 1.  Normal CHG terminations
  27.      always return 0 for the error level.
  28.  
  29.      CHG,  unlike  ATTRIB  and  other  replacements  for  DOS   ATTRIB,
  30.      emphasises the use of the absolute minimum number of keystrokes to
  31.      run  the  program.  Thus the option string is a cluster of letters
  32.      (see below)  indicating  attributes  to  apply,  rather  than  '-'
  33.      and  '+' signs associated with each attribute letter.  CHG's focus
  34.      on keystroke optimisation also overcomes a  shortcoming  in  other
  35.      programs  of  this  type  -  to  wit,  their  inability  to handle
  36.      filenames with dashes or underscores.
  37.  
  38.      Comments on Filename/wildcard:
  39.      ------------------------------
  40.      -  The  filename  or wildcard argument may either have no drive or
  41.      path specifiers or may be fully pathed, as in a filespec.  With no
  42.      path or drive information, CHG assumes the default drive and path.
  43.  
  44.      However,  if  the  user  wishes to change all files in the default
  45.      path, he/she must either use the regular '*.*' wildcard format  or
  46.      the '.' shortcut, which is also supported by regular DOS commands.
  47.  
  48.      CHG  also  supports  other  normal  DOS  shortcuts, such as "..\."
  49.      and "..\XYZ\." in place of the usual format for wildcards.
  50.  
  51.      New Feature:
  52.      CHG now supports directories, but permits changing only the Hidden
  53.      attribute  of  a  directory  or  directory  wildcard.  Attempts to
  54.      change other directory  information  are  interpreted  by  CHG  as
  55.      instructions  to  reset  the directory hide attribute, or leave it
  56.      visible, if not hidden.
  57.  
  58.      Comments on the option-string
  59.      -----------------------------
  60.      There are three mutually exclusive types of option-strings:
  61.  
  62.        1) Attribute-setting option strings.
  63.           ---------------------------------
  64.           These  must  contain  the  letters R, H, S, A, X, or D in any
  65.           combination  or  order.
  66.  
  67.           These flags have the following meanings:
  68.  
  69.           D:  Directory
  70.           R:  Read Only
  71.           H:  Hidden
  72.           S:  System
  73.           A:  Archive
  74.           X:  Reset
  75.  
  76.           Where  the  FIRST  CHARACTER  of  the  option string is D, it
  77.           identifies the file as a directory.  CHG  supports  directory
  78.           wildcards as well as file wildcards.
  79.  
  80.           For  both  files  and  directories,  CHG uses X for the reset
  81.           function.  However, the displayed attribute of a  reset  file
  82.           or directory is always null.
  83.  
  84.           Where the user specifies the input filespec as a directory by
  85.           using the D  prefix  on  the  option  string,  the  directory
  86.           attribute   is  omitted  if  the  directory  is  reset  (i.e.
  87.           visible).
  88.  
  89.           Supported display attributes:  R, H, S, A
  90.  
  91.           Directory examples:
  92.  
  93.           CHG . D            :Reads the attributes of all sub-
  94.                               directories in the default directory.
  95.  
  96.           CHG work\*.* DH    :Sets all subdirectories of \work to
  97.                               Hidden.
  98.  
  99.           CHG C:. D          :Reads all subdirectories of C:\
  100.                               (same as CHG C:\. D)
  101.  
  102.           CHG C:SYS\. DH     :Sets all subdirectories of C:\SYS to
  103.                               hidden (same as CHG C:\SYS\*.* DH)
  104.  
  105.           CHG . DX           :Resets all subdirectories of the default
  106.                               directory.
  107.  
  108.           CHG ABC D          :Reads attribute of subdirectory ABC.
  109.                               (No attribute will show if reset)
  110.  
  111.           CHG A*.* Dh        :Sets all subdirectories beginning
  112.                               with A to Hidden.
  113.  
  114.           File examples:
  115.  
  116.           CHG XYZ R          :Sets file XYZ to Read Only.
  117.  
  118.           CHG *.SYS RHSA     :Sets all .SYS files to Read Only
  119.                               Hidden System Archive.
  120.  
  121.           CHG \SYS\*.DOC X   :Resets all DOC files in the SYS
  122.                               subdirectory.
  123.  
  124.           CHG D:SYS\. H      :Hides all files in C:\SYS
  125.  
  126.           CHG C:.            :Reads all files in C:\
  127.  
  128.           What happens in default mode:
  129.           ----------------------------
  130.           Where  the  second  parameter is omitted, or where the second
  131.           parameter is simply a D, CHG simply displays attributes.   In
  132.           this mode, no change is made to files or directories.
  133.  
  134.        2) Date-setting option-strings.
  135.           ---------------------------
  136.           If you wish to change the date of a file or series  of  files
  137.           determined  by a wildcard mask, just use your desired date in
  138.           American slash format as your option-string.
  139.  
  140.           Examples:
  141.  
  142.           CHG RENAME.COM 2/1/89   :Changes RENAME.COM to 02-01-1989.
  143.  
  144.           CHG ABC TO/DAY          :Changes ABC to current computer date.
  145.                                    (i.e. to system date)
  146.  
  147.           Caveat:
  148.           If  you  attempt to change the date/time stamp of a Read Only
  149.           file, no date/time stamp change will occur.
  150.  
  151.        3) Time-setting option strings.
  152.           ---------------------------
  153.           Here, CHG uses the  colon  (':')  to  recognise  your  option
  154.           string  as  a  time.  CHG updates the time-stamp of a file to
  155.           one-minute precision.
  156.  
  157.           Examples:
  158.  
  159.           CHG ABC.EXE 5:40        :Changes ABC.EXE to 05:40 A.M.
  160.  
  161.           CHG ABC.EXE 14:20       :Changes ABC.EXE to 02:20 P.M.
  162.  
  163.           CHG *.EXE right:now     :Changes all .EXE files to current
  164.                                    computer time (i.e. to system time).
  165.  
  166.           Caveat:
  167.           If you attempt to change the date/time stamp of a  Read  Only
  168.           file, no date/time stamp change will occur.
  169.  
  170.      Errors
  171.      ------
  172.      CHG 2.2  is  much  more  adequately  error-trapped  than  previous
  173.      versions;  and where an error occurs, processing terminates with a
  174.      helpful diagnostic message and DOS error level of 1.
  175.  
  176.      DISCLAIMER:
  177.      ==========
  178.      This  program is circulated as public domain without any guarantee
  179.      or warranty; and the user, by downloading  this  program,  or  any
  180.      variant  thereof  or by receiving it or any of its versions in any
  181.      other form, agrees to accept full responsibility for its use.   It
  182.      is  therefore understood that the user accepts this program or any
  183.      previous version as is.
  184.  
  185.      Bob Eyer                  The author may also be reached at
  186.      Compuserve [73230,2620]   ROSE MEDIA 416-733-2285 (Main Conf)
  187.      Toronto                   or
  188.      Canada                    CANADA REMOTE 416-629-7044 (IBM Conf)
  189.      -------------------------------------------------------------
  190.      End of documentation.
  191.