home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / newc_dev / newlist6.lzh / NewList6 / Scripts / NewDpat < prev    next >
AmigaDOS Script File  |  1991-12-18  |  893b  |  33 lines

  1. .key com/a,pat/a,dir/a,opt1,opt2,opt3,opt4
  2. failat 21
  3. .bra {
  4. .ket }
  5.  
  6. ;  This is a modified Commodore s:spat for use with newlist.
  7. ;
  8. ;  Use this script to emulate wildcards for programs that do not use them.
  9. ;
  10. ;  NewDpat will use 1 wildcard and 1 directory.
  11. ;
  12. ;  ie      NewDpat "lharc x" dh0:* dh1:
  13. ;
  14. ;  I know this is a bad example, but to tell you the truth, I've never
  15. ;    ever had to use dpat in my 5 year career with the Amiga.....
  16.  
  17. echo >ENV:qw{$$} "{dir}" first=256
  18. IF $qw{$$} EQ ":"
  19.   nl {pat} -E "{com} \'%P\' \'{dir}%n\' {opt1} {opt2} {opt3} {opt4}"
  20.   skip doit
  21. ENDIF
  22. IF $qw{$$} EQ "/"
  23.   nl {pat} -E "{com} \'%P\' \'{dir}%n\' {opt1} {opt2} {opt3} {opt4}"
  24.   skip doit
  25. ENDIF
  26. IF EXISTS {dir}
  27.   nl {pat} -E "{com} \'%P\' \'{dir}/%n\' {opt1} {opt2} {opt3} {opt4}"
  28. ELSE
  29.   nl {pat} -E "{com} \'%P\' \'{dir}\' {opt1} {opt2} {opt3} {opt4}"
  30. ENDIF
  31. lab doit
  32. ;do wildcards for double arg command
  33.