home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / adeptful.zip / Convertlzh.Cmd < prev    next >
OS/2 REXX Batch file  |  1995-07-28  |  2KB  |  61 lines

  1. @echo off
  2. REM /////////////////////////////////////////////
  3. REM This is a sample ConvertLZH.Cmd for AdeptXBBS
  4. REM It will unarchive a LZH file and convert it
  5. REM to a ZIP file.
  6. REM /////////////////////////////////////////////
  7.  
  8. REM //////////////////////////////////////////
  9. REM Command line parms are as follows:
  10. REM %1 = Complete filename to work on
  11. REM %2 = Line number
  12. REM %3 = Com port file handle
  13. REM %4 = Just filename (no path, no extension)
  14. REM %5 = Just extension
  15. REM %6 = Just Drive:Path
  16. REM //////////////////////////////////////////
  17.  
  18. REM //////////////////////////////////////
  19. REM Change to drive where temporary files
  20. REM will be stored
  21. REM //////////////////////////////////////
  22. C:
  23.  
  24. REM ////////////////////////////////////
  25. REM Change to dir where temporary files
  26. REM will be stored
  27. REM ////////////////////////////////////
  28. CD\Adept\System\Line%2
  29.  
  30. REM /////////////////////
  31. REM Make a convert subdir
  32. REM /////////////////////
  33. MD Convert
  34. CD Convert
  35.  
  36. REM ////////////////////////////////////////
  37. REM Extract files into temp directory
  38. REM ////////////////////////////////////////
  39. LH X %1
  40.  
  41. REM ////////////////////////////////////
  42. REM ZIP up the files
  43. REM NOTE: Same dir, different extension
  44. REM ////////////////////////////////////
  45. ZIP -m %6%4
  46.  
  47. IF ERRORLEVEL 1 GOTO Cleanup
  48.  
  49. DEL %1
  50.  
  51. ECHO %4.ZIP >%4.NewName
  52.  
  53.  
  54. :Cleanup
  55. REM /////////////
  56. REM Back to Adept
  57. REM /////////////
  58. C:
  59. CD\Adept
  60. DEL /Y C:\Adept\System\Line%2\Convert
  61. RD C:\Adept\System\Line%2\Convert