home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / s / dpat < prev    next >
AmigaDOS Script File  |  1991-10-17  |  654b  |  25 lines

  1. .key com/a,pat/a,dir/a,opt1,opt2,opt3,opt4
  2. failat 21
  3. echo >ENV:qw<$$> "<dir>" first=256
  4. IF $qw<$$> EQ ":"
  5.   list >t:q<$$> <pat> lformat="<com> *"%s%s*" *"<dir>%s*" <opt1> <opt2> <opt3> <opt4>"
  6.   skip doit
  7. ENDIF
  8. IF $qw<$$> EQ "/"
  9.   list >t:q<$$> <pat> lformat="<com> *"%s%s*" *"<dir>%s*" <opt1> <opt2> <opt3> <opt4>"
  10.   skip doit
  11. ENDIF
  12. IF EXISTS <dir>
  13.   list >t:q<$$> <pat> lformat="<com> *"%s%s*" *"<dir>/%s*" <opt1> <opt2> <opt3> <OPT4>"
  14. ELSE
  15.   list >t:q<$$> <pat> lformat="<com> *"%s%s*" *"<dir>*" <opt1> <opt2> <opt3> <OPT4>"
  16. ENDIF
  17. lab doit
  18. IF NOT FAIL
  19.   execute t:q<$$>
  20. ELSE
  21. echo "<pat> not found"
  22. ENDIF
  23. failat 10
  24. ;do wildcards for double arg command
  25.