home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / p1osapar.zip / OS2APARS.CMD next >
OS/2 REXX Batch file  |  1993-09-28  |  819b  |  32 lines

  1. /* */
  2. Call RxFuncAdd 'SysFileTree','RexxUtil','SysFileTree'
  3.  
  4. aparinf. = ''
  5. inf_list = ''
  6. Call SysFileTree '??APR?.INF','APARINF','FO'
  7. If aparinf.0 > 0 Then Do
  8.   Do loop = 1 to aparinf.0
  9.     aparinf.loop = FILESPEC('N',aparinf.loop)
  10.     End
  11.  
  12.   /* Sort the filenames to keep the files in the right sequence */
  13.   Do loop1 = 1 to aparinf.0 - 1
  14.     Do loop2 = loop1+1 to aparinf.0
  15.       If aparinf.loop1 > aparinf.loop2 Then Do
  16.         temp = aparinf.loop1
  17.         aparinf.loop1 = aparinf.loop2
  18.         aparinf.loop2 = temp
  19.         End
  20.       End
  21.     End
  22.  
  23.   Do loop = 1 to aparinf.0
  24.     inf_list = inf_list'+'aparinf.loop
  25.     End
  26.   inf_list = SUBSTR(inf_list,2)   /* Remove the leading '+' */
  27.   '@VIEW' inf_list
  28.   End
  29. Else
  30.   Say 'No OS2APAR INF files were found in the current directory.'
  31. Exit
  32.