home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / i2htm091.zip / bmp2gif.cmd next >
OS/2 REXX Batch file  |  1998-11-11  |  822b  |  25 lines

  1. /* BMP2GIF:
  2.    This little utility will convert all BMP files which
  3.    have been created by HTML2IPF to GIF files so you can
  4.    view them using a regular browser.
  5.    Requirements:
  6.    --  The "Generalized Bitmap Module" (GBM) must be on
  7.        your PATH.
  8.    --  This script must be started _in_ the directory
  9.        where the BMP files reside.
  10. */
  11. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  12. call SysLoadFuncs
  13.  
  14. rc = SysFileTree("*.bmp", "BmpFiles", "FO");
  15.  
  16. if (BmpFiles.0 > 0) then
  17.     do i = 1 to BmpFiles.0
  18.         Filename = filespec("name", BmpFiles.i);
  19.         Filestem = left(Filename, length(Filename)-4);
  20.         Say 'Converting "'Filename"...";
  21.         'gbmsize "'Filestem'.bmp" "'Filestem'.gif",1.1'
  22.     end
  23. else
  24.     Say 'No bitmap files found in directory "'directory()'".';
  25.