home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 29 Fixes_o / 29-Fixes_o.zip / cobunzip.cmd < prev    next >
OS/2 REXX Batch file  |  1996-02-17  |  956b  |  42 lines

  1. /*------------------------------------------------------*/
  2. /* PROGRAM:  COBUNZIP.CMD                               */
  3. /* Unzip VisualAge COBOL 1.1 CSD #1 ZIP files           */
  4. /* COPYRIGHT: Copyright (C) International Business      */
  5. /*            Machines Corp. 1996                       */
  6. /*------------------------------------------------------*/
  7.  
  8.   basename = 'cob111'
  9.   nfiles = 9
  10.  
  11.   parse upper arg options
  12.  
  13.   if options == "?" | options == "/?" then do
  14.      say "Usage:  cobunzip [/d]"
  15.      say "  Unzip CSD files."
  16.      say "  Use option /d to delete zip files after unzipping."
  17.      say "  Requires PKUNZIP2.EXE."
  18.      exit
  19.   end
  20.  
  21.   if options == "/D" then
  22.      delete = TRUE
  23.   else
  24.      delete = FALSE
  25.  
  26.   do i = 1 to nfiles
  27.  
  28.      if i < 10 then
  29.         num = "0" || i
  30.      else
  31.         num = i
  32.  
  33.      zipname = basename || num || ".zip"
  34.  
  35.      'pkunzip2 -d -o' zipname
  36.  
  37.      if delete == TRUE then
  38.         'del' zipname
  39.   end
  40.  
  41.   exit
  42.