home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / ho2.zip / HO.DOC < prev    next >
Text File  |  1994-02-12  |  3KB  |  84 lines

  1. HO for OS/2 by Walt Howard Version 1.0 Feb 12 1994
  2. Do X to all files fitting specification Y.
  3. Copyright (c) 1994 by Walter F. Howard, All Rights Reserved
  4.  
  5. Ho will perform a command line on every file that matches a spec. You
  6. give it a command line using normal characters and some special ones
  7. that get replaced during execution. The command line is what you
  8. want done on each of the files. This command line MUST be enclosed in
  9. quotes
  10.  
  11. USAGE: ho "command" <options>
  12.  
  13. Where "command" is the command line in which any of the following
  14. variables will expand out when executed:
  15.  
  16. Variable    Description                 Expands to
  17. ------------------------------------------------------------------------
  18. @n          file name                   COMMAND.COM
  19. @f          full path spec              C:\OS2\MDOS\COMMAND.COM
  20. @d          directory only              \OS2\MDOS
  21. @h          drive letter                C
  22. @r          file root (no extension)    COMMAND
  23. @e          file extension              COM
  24.  
  25. OPTIONS:
  26.  
  27. p=<file pattern> multiple allowed, if no p=, file names will be taken
  28. from standard input
  29. D=<directory to work on> defaults to current directory. Any option
  30. starting with a \ or a drive specifier (C:) will also be understood
  31. as the directory to start the work in
  32.  
  33. +s do subdirectories also
  34. +q ask before each command is executed
  35. +c change directories when doing subdirectories
  36. +d only do DIRECTORY names
  37.  
  38. a=<attributes> ARSH (Archive, Read Only, System, Hidden)
  39. a!<not attributes> ARSH
  40. a$<any of these attributes> ARSH
  41.  
  42. MORE OPTIONS:
  43.  
  44. You can select by dates and sizes also using the following symbols:
  45.  
  46. Symbol  Meaning                 Example
  47. --------------------------------------------------------------------------
  48. d       last write date         d}2/1/93    write dated on or after 2/1/93
  49. l       last access date        l{7/15/94   last accessed before 7/15/94
  50. c       created date            c=12/16/86  created on 12/16/86
  51. s       size                    s}300000    size greater than 300000 bytes
  52. =       equal to or on the date l=10/13/90
  53. }       greater than or equal   c}7/9/87
  54. {       less than or equal to   s{5
  55.  
  56. Note: Curly Braces are used rather than the obvious ">" and "<" because
  57. those would tell the command interpreter to redirect input or output.
  58. Multiple commands can be executed by separating them with a semi-colon (;).
  59.  
  60. There some additional advanced variables you can put in the command line.
  61.  
  62. Variable    Description                 Expands to
  63. ------------------------------------------------------------------------
  64. @u          uppercase file name         COMMAND.COM
  65. @l          lowercase file name         command.com
  66. @'prompt'   prompt user                 special - asks user question
  67.  
  68. EXAMPLES:
  69.  
  70. ho "copy @f b:" D=\os2 p=*.exe d}2/20/93
  71. copy all *.exe files in the \os2 directory, dated after or on 2/20/93 to b:
  72.  
  73. ho "ren @f @'new file name'" p=*
  74. go through each file in the directory and ask the user for a new name
  75.  
  76. ho "del @n" d=12-12-92 +q <filelist.txt
  77. delete all files whose names are in the file filelist.txt and dated 12-12-92
  78. The +q would also cause the user to be asked yes or no to each deletion
  79.  
  80. ho "copy @n b:\old\@n; del @n" p=* s}300000 a=r
  81. copy all files sized 300000 or over with ro attribute to b:\old then delete
  82.  
  83. walth@netcom.com
  84.