home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxset211.zip / RXWCRD.CMD < prev   
OS/2 REXX Batch file  |  1995-11-05  |  930b  |  39 lines

  1. /* */
  2. Say "Sample Rexx program for demonstrating RXWILDCARD function"
  3. Say "RxFnSet by Leshek Fiedorowicz"
  4. Say
  5.  
  6.  
  7. Arg Number
  8.  
  9.     Call RxFuncDrop 'RXWILDCARD'
  10.  
  11.     Call RxFuncAdd 'RXWILDCARD', 'RXFN32', 'RXWILDCARD'
  12.  
  13.     say
  14.     MF = 'MYFILE.cmd'
  15.     WC = '*.cmd'
  16.     Result = RxWildCard(MF, WC)
  17.     if Result = MF then 
  18.       say MF' matches Wildcard 'WC' (Edited name is:'Result
  19.     else
  20.       say MF' does not match Wildcard 'WC' (Edited name is:'Result
  21.  
  22.     say
  23.     MF = 'MYFILE.cmd'
  24.     WC = '*.bbb'
  25.     Result = RxWildCard(MF, WC)
  26.     if Result = MF then 
  27.       say MF' matches Wildcard 'WC' (Edited name is:'Result
  28.     else
  29.       say MF' does not match Wildcard 'WC' (Edited name is:'Result
  30.  
  31.     say
  32.     MF = 'MYFILE.cmd'
  33.     WC = '*.bat'
  34.     Result = RxWildCard(MF, WC)
  35.     say 'If you call >COPY 'MF WC' your file 'MF' will be copied to 'Result
  36.  
  37.     Call RxFuncDrop 'RXWILDCARD'
  38. Exit
  39.