home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / fileutil / dhrff / dhrff.doc next >
Encoding:
Text File  |  1992-09-17  |  21.8 KB  |  550 lines

  1.  
  2.         DHRFF Version 1.00 Documentation
  3.         DHRFF Version 1.00 Documentation
  4.         DHRFF Version 1.00 Documentation
  5.         Copyright (c) 1992 by Dennis H. Rosenthal
  6.         09/92
  7.  
  8.  
  9.  
  10.         Overview
  11.         Overview
  12.         Overview
  13.         ________
  14.         ________
  15.         ________
  16.  
  17.         The program DHRFF is an OS/2 command line file and directory list
  18.         and search program. In mode 0, the output matches the DIR command
  19.         output. With the proper System Setup Country Settings, the output
  20.         will match the DIR command exactly. Some of the DIR options have
  21.         been extended and corrected. Additional options are provided. In
  22.         mode 1, the output matches the RexxUtil SysFileTree output. Mode
  23.         2 is used for finding files and combines mode 1 with the /s
  24.         option. Does not operate is DOS sessions.
  25.  
  26.  
  27.         Mode 0 Operation
  28.         Mode 0 Operation
  29.         Mode 0 Operation
  30.         ________________
  31.         ________________
  32.         ________________
  33.  
  34.         The DHRFF program in mode 0 matches the output of the DIR com-
  35.         mand, corrects some DIR problems, and for large displays is
  36.         faster than DIR.
  37.  
  38.         DIR functions supported -
  39.  
  40.           All including the undocumented (in OS/2) 'set DIRCMD='
  41.           Most error messages extracted from the same system message file
  42.             used by DIR
  43.  
  44.         DIR improvements -
  45.  
  46.           Sort options work with large directories (max 20,000 files, tested
  47.             on a subdirectory with over 10,000 files - DIR just closes the
  48.             session)
  49.           Option /a includes option to show files that have EAs
  50.           Option /r works in OS/2 command environment showing long names for
  51.             FAT or HPFS files
  52.           Option to show access date-time and creation date-time along with
  53.             the standard write date-time for HPFS files
  54.           Option to show file attributes (system, hidden, read only, etc.)
  55.           Option to show EA names
  56.           Option to select files by date-time range
  57.           Option to create file
  58.           Option to turn off console display
  59.           Complies with code page and system setup country settings for date
  60.             and time formats
  61.           Eliminates trailing spaces on output with the /w option
  62.  
  63.  
  64.         Mode 1 Operation
  65.         Mode 1 Operation
  66.         Mode 1 Operation
  67.         ________________
  68.         ________________
  69.         ________________
  70.  
  71.         The DHRFF program in mode 1 matches the output format of the
  72.         RexxUtil SysFileTree, extends options, and corrects some SysFile-
  73.         Tree problems.
  74.  
  75.           Corrects time format between midnight and 1 AM
  76.             (SysFileTree formats time as 00:04a instead of 12:04a)
  77.  
  78.  
  79.                                         1
  80.  
  81.         DHRFF Version 1.00 Documentation
  82.         DHRFF Version 1.00 Documentation
  83.         DHRFF Version 1.00 Documentation
  84.         Copyright (c) 1992 by Dennis H. Rosenthal
  85.         09/92
  86.  
  87.  
  88.  
  89.           Complies with code page and system setup country settings for date
  90.             and time formats
  91.           Finds all files
  92.             (SysFileTree uses 32 bit functions which do not find
  93.                 subdirectories with leading spaces at this time)
  94.           Allows complete specification of attributes with /a options just
  95.             like DIR - default is to show files including directories, use -
  96.             /af to show just files
  97.             /ad to show just directories
  98.           Supports sorting within subdirectories like DIR
  99.  
  100.  
  101.         Command Syntax
  102.         Command Syntax
  103.         Command Syntax
  104.         ______________
  105.         ______________
  106.         ______________
  107.  
  108.         DHRFF [Options] [Disk:][Starting Directory\][File Selection] [...]
  109.  
  110.         [Options] - Optional parameters to control output. See below.
  111.             Options may appear anywhere on the command line, before, after,
  112.             or before and after the file information.
  113.         [Disk] - Optional Drive Letter. Specify as d...d: where d is
  114.             one or more drive letters - Or ?: to search all drives
  115.             starting with the C drive.
  116.         [Starting Directory] - Optional fully qualified directory where
  117.             search is to start.
  118.         [File Selection] - Optional file selection criterion using
  119.             standard DOS-OS/2 format including * and ?.
  120.         [...] - The [Disk:][Starting Directory\][File Selection] combination
  121.             may be repeated
  122.  
  123.  
  124.         Command Line Options
  125.         Command Line Options
  126.         Command Line Options
  127.         ____________________
  128.         ____________________
  129.         ____________________
  130.  
  131.          /a:... - Select All Files Unless Followed By -
  132.               a - Select Only Archived (Modified) Files
  133.              -a - Select No Archived (Modified) Files
  134.               d - Select Only Directories
  135.              -d - Select No Directories
  136.               e - Select Only Files or Directories with Extended Attributes **
  137.              -e - Select No Files or Directories with Extended Attributes **
  138.               h - Select Only Hidden Files
  139.              -h - Select No Hidden Files
  140.               r - Select Only Read Only Files
  141.              -r - Select No Read Only Files
  142.               s - Select Only System Files
  143.              -s - Select No System Files
  144.          /b - Display files without heading and summary
  145.          /f - Display Fully Qualified File Names Only
  146.          /p - Pause on full screen
  147.          /s - Process Subdirectories
  148.          /l - Display file names in lower case
  149.          /n - Display files on FAT disks in HPFS format
  150.          /o... - Sort display by specified fields
  151.  
  152.  
  153.                                         2
  154.  
  155.         DHRFF Version 1.00 Documentation
  156.         DHRFF Version 1.00 Documentation
  157.         DHRFF Version 1.00 Documentation
  158.         Copyright (c) 1992 by Dennis H. Rosenthal
  159.         09/92
  160.  
  161.  
  162.  
  163.               n - File name and type with A first
  164.              -n - File name and type with A last
  165.               e - File type with A first
  166.              -e - File type with A last
  167.               d - Date and Time - most recent last
  168.              -d - Date and Time - most recent first
  169.               s - Size - smallest first
  170.              -s - Size - largest first
  171.               g - Directories first
  172.              -g - Directories last
  173.          /r - Display long file names
  174.          /w - Display files in multiple columns
  175.  
  176.         Those items above marked with ** are extensions and the following
  177.         are extensions -
  178.  
  179.          /d - Select file by date (see below)
  180.                 - /d[,=,g,l]YYMMDDHHMM[-YYMMDDHHMM]
  181.          /k - Create DAT File with Directory and File Information in
  182.                  RexxUtil format
  183.          /e - Show EA Names
  184.          /t - Show Attribute Information
  185.          /j - Display Access Date and Creation Date for files on HPFS disks
  186.          /v - Suppress Video Display
  187.          /0 - Mode 0 Selection, OS/2 DIR like display (default)
  188.          /1 - Mode 1 Selection, RexxUtil SysFileTree like display
  189.          /2 - Mode 2 Selection, Mode 1 plus /s for file name searching
  190.          /? - Display List of Options
  191.  
  192.  
  193.         Date Selection
  194.         Date Selection
  195.         Date Selection
  196.         ______________
  197.         ______________
  198.         ______________
  199.  
  200.         The /d option is used to select files based on write date-time. A
  201.         single date-time may be entered in the format YYMMDDHHMM (year-
  202.         month-day-hour-minute) along with an '=', 'G', or 'L' to indicate
  203.         comparison type. The '=' indicates that all selected files must
  204.         match the entered date-time. The 'G' indicates that all selected
  205.         files must have a date-time that is greater than the entered
  206.         date-time. The 'L' indicates that all selected files must have a
  207.         date-time that is less than the entered date-time. The default is
  208.         '=' and does not have to be entered. The complete date-time also
  209.         does not have to be entered. Examples -
  210.  
  211.          /d910101 or /d=910101 - select files with date of 01/01/91
  212.          /dg910101 - select files with date greater than 01/01/91
  213.          /dl910101 - select files with date less than 01/01/91
  214.          /d9101 - select file with the year and month equal to 01/??/91
  215.          /d91 - select file with the year equal to ??/??/91
  216.          /d9101010101 - select files with date of 01/01/91 and time of 01:01a
  217.  
  218.         The /d option also supports a date range /d9101010101-9104010101.
  219.         The date range is inclusive. Examples -
  220.  
  221.  
  222.                                         3
  223.  
  224.         DHRFF Version 1.00 Documentation
  225.         DHRFF Version 1.00 Documentation
  226.         DHRFF Version 1.00 Documentation
  227.         Copyright (c) 1992 by Dennis H. Rosenthal
  228.         09/92
  229.  
  230.  
  231.  
  232.  
  233.          /d91-/92 - select files with year >= 91 and <= 92
  234.          /d9108-/92 - select files with date >= 08/??/91 and <= 92
  235.          /d920804-/920903 - select files with date >= 08/04/92 and <= 09/03/92
  236.  
  237.         Multiple dates may be entered. Any file date that matches any
  238.         date entered will be selected. Example -
  239.  
  240.          /d920904 /d920901 - select file with date 09/04/92 or 09/01/92
  241.  
  242.  
  243.         Set DIRCMD
  244.         Set DIRCMD
  245.         Set DIRCMD
  246.         __________
  247.         __________
  248.         __________
  249.  
  250.         The 'Set DIRCMD=' environment variable is supported. Values set
  251.         in the environment are processed before command line options.
  252.         Command line options may override environment options. The DHRFF
  253.         program also looks for the environment variable XDIRCMD. It will
  254.         be used in place of the DIRCMD values if found. Example -
  255.  
  256.         set DIRCMD=/n - DIR or DHRFF will always show files in HPFS
  257.                         format even on FAT disks.
  258.         set XDIRCMD=/os - DHRFF will sort files in size sequence before
  259.                         display. The DIRCMD setting will be ignored.
  260.  
  261.  
  262.         Date and Time Display
  263.         Date and Time Display
  264.         Date and Time Display
  265.         _____________________
  266.         _____________________
  267.         _____________________
  268.  
  269.         The display of dates and times by DHRFF are controlled by the
  270.         values specified in the codepage selection in CONFIG.SYS and the
  271.         customized values set in the Country Settings panel which is
  272.         found in the System Setup folder. Dates may appear in the format
  273.         Month-Day-Year, Day-Month-Year, or Year-Month-Day. The separator
  274.         may also be customized (-, /, etc.). Times may appear in 12 hour
  275.         or 24 hour format. The 12 hour format may additionally have AM or
  276.         PM appended (upper or lower case). The hour - minute separator
  277.         may also be customized.
  278.  
  279.  
  280.         Data File Format
  281.         Data File Format
  282.         Data File Format
  283.         ________________
  284.         ________________
  285.         ________________
  286.  
  287.         The /k option will create a file in RexxUtil SysFileTree format.
  288.         The file name will match the program name (DHRFF unless renamed,
  289.         and a max of 8 characters) with a file type of DAT. Each line
  290.         contains the date (MM/DD/YY), time (HH:MMx), file size, file
  291.         attributes (ADHRS), and fully qualified file name. The format of
  292.         the date and time are not adjustable. Example data -
  293.  
  294.          8/14/92   2:37p           0  -D---  G:\OS2PGMS\IBMC\...\X-X-X-X
  295.          9/07/92   4:18p       11135  -----  G:\OS2PGMS\IBMC\...\DECPARM.C
  296.          8/31/92   2:47p       57477  -----  G:\OS2PGMS\IBMC\...\DHRCMP.EXE
  297.  
  298.         In a REXX file, the RXQUEUE command may be used to send the
  299.  
  300.  
  301.                                         4
  302.  
  303.         DHRFF Version 1.00 Documentation
  304.         DHRFF Version 1.00 Documentation
  305.         DHRFF Version 1.00 Documentation
  306.         Copyright (c) 1992 by Dennis H. Rosenthal
  307.         09/92
  308.  
  309.  
  310.  
  311.         output of the program to the REXX stack for processing -
  312.  
  313.         DHRFF /2 \*.EXE | RXQUEUE
  314.         dirstem.0 = queued()
  315.         do dir_ctr = 1 to dirstem.0
  316.              pull dirstem.dir_ctr
  317.         end
  318.  
  319.  
  320.         Limitations
  321.         Limitations
  322.         Limitations
  323.         ___________
  324.         ___________
  325.         ___________
  326.  
  327.         DHRFF is not perfect. Although this program could replace the DIR
  328.         command completely, I would not recommend it. For small displays
  329.         the program load time is longer than the DIR display time. For
  330.         small sort requests, DIR is faster as it appears to insert each
  331.         new entry into a linked list according to sort sequence rather
  332.         than load and sort as is done in DHRFF.
  333.  
  334.  
  335.         Copyright and Disclaimer
  336.         Copyright and Disclaimer
  337.         Copyright and Disclaimer
  338.         ________________________
  339.         ________________________
  340.         ________________________
  341.  
  342.         The program DHRFF.EXE is placed in the public domain. The program
  343.         and this documentation are
  344.           Copyright (c) 1992 by Dennis H. Rosenthal,
  345.         the author. You may copy and distribute the program and
  346.         documentation without restriction.
  347.  
  348.         The program DHRFF.EXE is distributed as is, with no guarantee
  349.         that it will work correctly in all situations.  In no event will
  350.         the Author be liable for any damages whatsoever, including,
  351.         without limitation, loss of profit, loss of information, or
  352.         special, incidental, or consequential damages or other similar
  353.         claims, arising out of the use of or inability to use this
  354.         program, even if the Author has been advised of the possibility
  355.         of such damages, or for any claim by any other party.
  356.  
  357.         The DHRFF program is written entirely in C and compiled with the
  358.         IBM C Set/2 compiler. The source is available for a fee. I may be
  359.         contacted via CompuServe ID 75176,3003 or via mail -
  360.  
  361.         Dennis H. Rosenthal
  362.         417 Hialeah Drive
  363.         Cherry Hill, NJ 08002
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.                                         5
  376.  
  377.         DHRFF Version 1.00 Documentation
  378.         DHRFF Version 1.00 Documentation
  379.         DHRFF Version 1.00 Documentation
  380.         Copyright (c) 1992 by Dennis H. Rosenthal
  381.         09/92
  382.  
  383.  
  384.  
  385.         Examples
  386.         Examples
  387.         Examples
  388.         ________
  389.         ________
  390.         ________
  391.  
  392.  
  393.         DHRFF dhrff.exe
  394.         DHRFF dhrff.exe
  395.         DHRFF dhrff.exe
  396.  
  397.              Displays the dhrff.exe in the current directory exactly like
  398.         the DIR command -
  399.  
  400.          The volume label in drive G is FDISKG.
  401.          The Volume Serial Number is A4BB:7814
  402.          Directory of G:\OS2PGMS\IBMC\WKFRAME\DHRFF
  403.  
  404.         DHRFF    EXE    68096   9-14-92   3:37p
  405.                  1 file(s)      68096 bytes used
  406.                              35749888 bytes free
  407.  
  408.  
  409.         DHRFF /s /ae /n \
  410.         DHRFF /s /ae /n \
  411.         DHRFF /s /ae /n \
  412.  
  413.              Displays all files on the current disk that have extended
  414.         attributes. Display is in HPFS format to show EA size -
  415.  
  416.          The volume label in drive D is OS2.
  417.          The Volume Serial Number is A561:C014
  418.  
  419.          Directory of D:\
  420.  
  421.          7-01-92   9:21p     <DIR>         296  NOWHERE
  422.          7-01-92   9:21p     <DIR>        1116  OS!2_2.0_D
  423.          3-30-92  12:00p    716044          49  OS2KRNL
  424.          7-04-92  11:56p        94         402  DHRRU100.CMD
  425.                  4 file(s)     716138 bytes used
  426.  
  427.          Directory of D:\OS2
  428.  
  429.          3-30-92  12:00p      5655          53  ANSI.EXE
  430.          3-30-92  12:00p     36765          53  ATTRIB.EXE
  431.          3-30-92  12:00p     83433          53  BACKUP.EXE
  432.          ...
  433.  
  434.          Directory of D:\OS!2_2.0_D\PGM_TOOL\TOOLKIT\SAMPLE_P
  435.  
  436.          7-03-92  10:58a       416        3755  WP_CAR_S
  437.                  1 file(s)        416 bytes used
  438.  
  439.         Total files listed:
  440.                299 file(s)   13680450 bytes used
  441.                              12304384 bytes free
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.                                         6
  449.  
  450.         DHRFF Version 1.00 Documentation
  451.         DHRFF Version 1.00 Documentation
  452.         DHRFF Version 1.00 Documentation
  453.         Copyright (c) 1992 by Dennis H. Rosenthal
  454.         09/92
  455.  
  456.  
  457.  
  458.         DHRFF /t /a
  459.         DHRFF /t /a
  460.         DHRFF /t /a
  461.  
  462.              Displays all files in current directory in DIR format along
  463.         with attribute information. The attribute information shows a
  464.         letter or a dash indicating the status of the attribute for the
  465.         file - ADHRS indicates Archive, Directory, Hidden, Read Only, and
  466.         System -
  467.  
  468.           The volume label in drive D is OS2.
  469.           The Volume Serial Number is A561:C014
  470.           Directory of D:\
  471.  
  472.          NOWHERE      <DIR>      7-01-92   9:21p -D---
  473.          OS2          <DIR>      7-01-92   8:47p -D---
  474.          OS!2_2   0_D <DIR>      7-01-92   9:21p -D---
  475.          PSFONTS      <DIR>      7-01-92   8:57p -D---
  476.          SPOOL        <DIR>      7-01-92   9:20p -D---
  477.          OS2BOOT          1099   7-01-92   8:55p --HRS
  478.          OS2KRNL        716044   3-30-92  12:00p --HRS
  479.          OS2LDR          32256   3-30-92  12:00p --HRS
  480.          EA DATA   SF   917504   7-01-92   8:47p A-HRS
  481.          WP ROOT   SF      264   9-15-92   9:40a A-H-S
  482.          ...
  483.                  26 file(s)    1784977 bytes used
  484.                               12304384 bytes free
  485.  
  486.  
  487.         DHRFF /e /s \*.cmd
  488.         DHRFF /e /s \*.cmd
  489.         DHRFF /e /s \*.cmd
  490.  
  491.              Displays all CMD files on the current disk along with ex-
  492.         tended attribute information. Names appear on a separate line
  493.         which includes EA value length and length of name -
  494.  
  495.           The volume label in drive D is OS2.
  496.           The Volume Serial Number is A561:C014
  497.  
  498.           Directory of D:\
  499.  
  500.          ATTR1    CMD      123   7-07-92  10:18a
  501.          ATTR2    CMD      145   7-07-92  10:18a
  502.          DHRRU100 CMD       94   7-04-92  11:56p
  503.           EA Value Length    68, Name - (16)REXX.METACONTROL
  504.           EA Value Length    91, Name - (16)REXX.LITERALPOOL
  505.           EA Value Length    53, Name - (16)REXX.VARIABLEBUF
  506.           EA Value Length   102, Name - (16)REXX.TOKENSIMAGE
  507.                   3 file(s)        362 bytes used
  508.          ...
  509.          Total files listed:
  510.                  54 file(s)     359924 bytes used
  511.                               12304384 bytes free
  512.  
  513.  
  514.  
  515.  
  516.                                         7
  517.  
  518.         DHRFF Version 1.00 Documentation
  519.         DHRFF Version 1.00 Documentation
  520.         DHRFF Version 1.00 Documentation
  521.         Copyright (c) 1992 by Dennis H. Rosenthal
  522.         09/92
  523.  
  524.  
  525.  
  526.  
  527.         DHRFF /1 /s /ae /n \   or   DHRFF /2 /ae /n \
  528.         DHRFF /1 /s /ae /n \   or   DHRFF /2 /ae /n \
  529.         DHRFF /1 /s /ae /n \   or   DHRFF /2 /ae /n \
  530.  
  531.              Displays all files on the current disk that have extended
  532.         attributes in RexxUtil SysFileTree format -
  533.  
  534.          7/01/92   9:21p           0  -D---    296  D:\NOWHERE
  535.          7/01/92   9:21p           0  -D---   1116  D:\OS!2_2.0_D
  536.          3/30/92  12:00p      716044  --HRS     49  D:\OS2KRNL
  537.          7/04/92  11:56p          94  -----    402  D:\DHRRU100.CMD
  538.          3/30/92  12:00p        5655  -----     53  D:\OS2\ANSI.EXE
  539.          3/30/92  12:00p       36765  -----     53  D:\OS2\ATTRIB.EXE
  540.          3/30/92  12:00p       83433  -----     53  D:\OS2\BACKUP.EXE
  541.          3/30/92  12:00p       40951  -----     53  D:\OS2\DISKCOMP.COM
  542.          3/30/92  12:00p       45108  -----     53  D:\OS2\DISKCOPY.COM
  543.          3/30/92  12:00p       71442  -----   3542  D:\OS2\E.EXE
  544.          ...
  545.  
  546.  
  547.         DHRFF /2 /j \*.exe
  548.         DHRFF /2 /j \*.exe
  549.         DHRFF /2 /j \*.exe
  550.  
  551.              Displays all EXE files on the current disk along with the
  552.         last access date and creation date (HPFS disks only) in RexxUtil
  553.         format -
  554.  
  555.          3/30/92  12:00p        5655  -----  ( 8/11/92 10:49a) ( 7/11/92 11:41a)
  556.         I:\OS2\ANSI.EXE
  557.          3/30/92  12:00p       36765  -----  ( 8/11/92 10:49a) ( 7/11/92 12:06p)
  558.         I:\OS2\ATTRIB.EXE
  559.          ...
  560.          3/30/92  12:00p       14436  -----  ( 8/11/92 10:53a) ( 7/11/92 11:42a)
  561.         I:\OS2\SYSTEM\HARDERR.EXE
  562.          3/30/92  12:00p       15360  -----  ( 8/11/92 10:53a) ( 7/11/92 11:54a)
  563.         I:\OS2\SYSTEM\LOGDAEM.EXE
  564.  
  565.  
  566.         DHRFF /2 ?:\CD*.SYS
  567.         DHRFF /2 ?:\CD*.SYS
  568.         DHRFF /2 ?:\CD*.SYS
  569.  
  570.              Displays all files that begin with CD and have a file type
  571.         of SYS. The ?: will search all hard disks -
  572.  
  573.           3/30/92  12:00p       21556  -----  D:\OS2\CDROM.SYS
  574.           3/30/92  12:00p       21556  -----  I:\OS2\CDROM.SYS
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.                                         8
  587.  
  588.         DHRFF Version 1.00 Documentation
  589.         DHRFF Version 1.00 Documentation
  590.         DHRFF Version 1.00 Documentation
  591.         Copyright (c) 1992 by Dennis H. Rosenthal
  592.         09/92
  593.  
  594.  
  595.  
  596.         OS/2 functions called by DHRFF
  597.         OS/2 functions called by DHRFF
  598.         OS/2 functions called by DHRFF
  599.         ______________________________
  600.         ______________________________
  601.         ______________________________
  602.  
  603.             Dos16FindFirst2, Dos16FindNext, Dos16FindClose
  604.                 The 32 bit DosFindFirst, DosFindNext functions do not
  605.                 find subdirectories with leading spaces. The 16 bit
  606.                 functions work properly.
  607.             DosAllocMem
  608.             DosEnumAttribute
  609.             DosFreeMem
  610.             DosGetDateTime
  611.             DosGetMessage
  612.             DosQueryCtryInfo
  613.             DosQueryCurrentDisk
  614.             DosQueryFSAttach
  615.             DosQueryFSInfo
  616.             DosQueryPathInfo
  617.             DosQuerySysInfo
  618.             DosScanEnv
  619.             KbdCharIn
  620.             KbdFlushBuffer
  621.             KbdGetStatus
  622.             KbdSetStatus
  623.             PrfQueryProfileData
  624.             VioGetMode
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.                                         9
  656.  
  657.  
  658.