home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d09xx / d0995.lha / WhatIs / c / For.doc < prev    next >
Text File  |  1994-04-05  |  3KB  |  109 lines

  1.  
  2.                                   For.doc
  3.  
  4.  
  5.  
  6.     "For" work only under KS2.0+
  7.  
  8.     "For"  is a foreach command.  For each object (file/dir) which pattern
  9. (name  pattern  or  FileType  pattern) "For" execute the specified command
  10. replacing all %% (maximum 5) by the name of the current file.
  11.  
  12.     Eg:
  13.  
  14.         For *.doc DO copy %% to DOC:
  15.  
  16.         Search  all  file ine current dir which match to *.doc and execute
  17. the command:  "copy file.doc to DOC:"
  18.  
  19.         For SYS: Type "%*(Icon)" DO Protect %% -d
  20.  
  21.         Look  in  the  SYS:   and subdirs for file which was recognised by
  22. whatis.library  as  Icon  (or  subtype  of  Icon) and execute the command:
  23. "Protect iconfile -d"
  24.  
  25.         For also parse an environement varable called "For.DefOpts" Before
  26. your CLI args.
  27.  
  28. For V2.0
  29. Usage: For <Pattern> [FILES <MATCH|YES|NO>]  [DIRS <MATCH|YES|NO>]
  30. [Since <Date>] [Before <Date>]
  31. [MinSize <Number>] [ MaxSize <Number>]
  32. [PosProtect < L|C|H|S|P|A|R|W|E|D>] [ NegProtect <L|C|H|S|P|A|R|W|E|D>]
  33. [Type <FileType0...FileType9|%=ONLY|*=SUB|!=EXLC>]
  34. [ALL] [ASYNC]
  35. [READSIZE] [SHOWBYTE] [DEEPWHATIS] [SHOWFILETYPE]
  36. [DO <Command [args] [,Command [args] [,...]]>]
  37.  
  38. Pattern $Pat1 $Pat2 $Pat255: any number of pattern like
  39.     *.doc
  40.     WB:*.info More MuchMore *.doc
  41.  
  42. FILES:
  43.     MATCH:  look if file match to current pattern
  44.     YES:    include all file encounter
  45.     NO:     exclude all file encounter
  46.     default YES
  47. DIRS:
  48.     MATCH:  look if dir match to current pattern
  49.     YES:    include all dir encounter
  50.     NO:     exclude all dir encounter
  51.     default YES
  52.  
  53. Since $date:    include only file older than $date
  54.  
  55. Before $date:   include only file newer than $date
  56.  
  57. MinSise $size:  include only file bigger than $size
  58.  
  59. MaxSise $size:  include only file tyner than $size
  60.  
  61. bit C and L are special bit (not AmigaDOS)
  62.     C means file have a comment
  63.     L means file is a link
  64. PosProtect $protectbit: only include file which have this bits like
  65.     ae
  66.     srwed
  67.  
  68. NegProtect $protectbit: only include file which have'nt this bits like
  69.     a
  70.     hs
  71.  
  72. Type filetype_spec_list:
  73.  
  74.     for Template reason you must enclose your filetype_spec_list by '"'
  75. and each FileType name must be enclosed by open/close brace ()
  76. FileType  is one of the FileType of whatis.library this is not usable if
  77. have not instaled the whatis.library in your system.
  78.  
  79.     % means only this FileType
  80.     ! means exlude this FileType
  81.     # means with his sub type
  82.  
  83.     "!#(Exe)"  exlude  all  file  which was an "Exe" or one of its subtype
  84. like "PP40 Exe"
  85.     "%(Icn Disk),(Icn Grbg)"    only include "Icn Disk" and "Icn Grbg"
  86.  
  87. ALL: enter in all directory encounter
  88.  
  89. ASYNC:  this lounch your command asyncrously
  90.     default FALSE
  91.  
  92. READSIZE $size: $size "For" read to recongnise FileType
  93.  
  94. SHOWBYTE $numbyte: byte to display, only meanfull when SHOWFILETYPE is set
  95.  
  96. DEEP:   Choose Whatis level of Whatis.library, see whatis.library for more
  97. details.
  98.         0 = LightWhatIs  (Slow FileType Recognition, but do better result)
  99.         1 = DeepWhatIs
  100.     Default is LightWhatIs (0)
  101.     
  102. SHOWFILETYPE:  show the FileType spec.
  103.  
  104. DO:   your  command  to  execute, replacing all %% (upto 5) by the current
  105. object and ',' by CR enable you doing multinple command at time.
  106.     if you dont supply a DO, SHOWFILETYPE is automaticaly enable emulating
  107. a WhatIs command.
  108.  
  109.