home *** CD-ROM | disk | FTP | other *** search
- .key COM/A,PAT/A,DIR/A,OPT1,OPT2,OPT3,OPT4
- .bra {
- .ket }
-
- ; $VER: DPat 40.3 (23.2.93)
- ; Do wildcards for double argument commands
-
- FailAt 21
- Echo >ENV:qw{$$} "{DIR}" FIRST 256
-
- IF "$qw{$$}" EQ ""
- List >T:qw{$$} {PAT} LFORMAT "{COM} *"%s%s*" *"%s*" {OPT1} {OPT2} {OPT3} {OPT4}"
- Skip doit
- EndIF
-
- IF $qw{$$} EQ ":"
- List >T:q{$$} {PAT} LFORMAT "{COM} *"%s%s*" *"{DIR}%s*" {OPT1} {OPT2} {OPT3} {OPT4}"
- Skip doit
- EndIF
-
- IF $qw{$$} EQ "/"
- List >T:q{$$} {PAT} LFORMAT "{COM} *"%s%s*" *"{DIR}%s*" {OPT1} {OPT2} {OPT3} {OPT4}"
- Skip doit
- EndIF
-
- IF EXISTS {DIR}
- List >T:q{$$} {PAT} LFORMAT "{COM} *"%s%s*" *"{DIR}/%s*" {OPT1} {OPT2} {OPT3} {OPT4}"
- Else
- List >T:q{$$} {PAT} LFORMAT "{COM} *"%s%s*" *"{DIR}*" {OPT1} {OPT2} {OPT3} {OPT4}"
- EndIF
-
- Lab doit
-
- IF NOT FAIL
- Execute T:q{$$}
- Else
- Echo "{PAT} not found"
- EndIF
-
- Delete >NIL: ENV:qw{$$} T:q{$$} QUIET
-
- FailAt 10
-