home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / adf42w.zip / Extractdiz.Cmd < prev    next >
OS/2 REXX Batch file  |  1997-03-11  |  2KB  |  89 lines

  1. @echo off
  2. REM /////////////////////////////////////////////
  3. REM This is a sample ExtractDIZ.Cmd for AdeptXBBS
  4. REM /////////////////////////////////////////////
  5.  
  6. REM /////////////////////////////////////////////
  7. REM It will check for a FILE_ID.DIZ in arch.files
  8. REM and extract, rename it, and return to the BBS
  9. REM /////////////////////////////////////////////
  10.  
  11. REM //////////////////////////////////////////
  12. REM Command line parms are as follows:
  13. REM %1 = Complete filename to work on
  14. REM %2 = Line number
  15. REM %3 = Com port file handle
  16. REM %4 = Just filename (no path, no extension)
  17. REM %5 = Just extension
  18. REM %6 = Just Drive:Path
  19. REM //////////////////////////////////////////
  20.  
  21. REM /////////////////////////////////////////////
  22. REM 02/15/96
  23. REM Adept now looks for the description to be in
  24. REM the file called: Filename.Ext.Description
  25. REM instead of Filename.Description
  26. REM /////////////////////////////////////////////
  27.  
  28. CD \Adept\System\Line%2
  29.  
  30. REM ////////////////////////
  31. REM add more lines for more
  32. REM archive types..
  33. REM ////////////////////////
  34. IF %5==ARC GOTO ARC
  35. IF %5==ARJ GOTO ARJ
  36. IF %5==LZH GOTO LZH
  37. IF %5==RAR GOTO RAR
  38. IF %5==ZIP GOTO ZIP
  39. IF %5==ZOO GOTO ZOO
  40.  
  41. GOTO End
  42.  
  43. :ARC
  44. ARC e %1 FILE_ID.DIZ
  45. IF EXIST \Adept\Convert%5.CMD GOTO SKIP
  46. IF EXIST FILE_ID.DIZ REN FILE_ID.DIZ %4.%5.Description
  47. GOTO NONE
  48. CD \Adept
  49.  
  50. :ARJ
  51. UNARJ E %1 FILE_ID.DIZ
  52. IF EXIST \Adept\Convert%5.CMD GOTO SKIP
  53. IF EXIST FILE_ID.DIZ REN FILE_ID.DIZ %4.%5.Description
  54. GOTO NONE
  55. CD \Adept
  56.  
  57. :LZH
  58. LH32 X %1 FILE_ID.DIZ
  59. IF EXIST \Adept\Convert%5.CMD GOTO SKIP
  60. IF EXIST FILE_ID.DIZ REN FILE_ID.DIZ %4.%5.Description
  61. GOTO NONE
  62. CD \Adept
  63.  
  64. :RAR
  65. RAR e -c- -y %1 FILE_ID.DIZ
  66. IF EXIST \Adept\Convert%5.CMD GOTO SKIP
  67. IF EXIST FILE_ID.DIZ REN FILE_ID.DIZ %4.%5.Description
  68. GOTO NONE
  69. CD \Adept
  70.  
  71. :ZIP
  72. UNZIP -oC %1 FILE_ID.DIZ
  73. IF EXIST \Adept\Convert%5.CMD GOTO SKIP
  74. IF EXIST FILE_ID.DIZ REN FILE_ID.DIZ %4.%5.Description
  75. GOTO NONE
  76. CD \Adept
  77.  
  78. :ZOO
  79. ZOO -extract %1 FILE_ID.DIZ
  80. IF EXIST \Adept\Convert%5.CMD GOTO SKIP
  81. IF EXIST FILE_ID.DIZ REN FILE_ID.DIZ %4.%5.Description
  82. GOTO NONE
  83. CD \Adept
  84.  
  85. :NONE
  86. :SKIP
  87. CD \Adept
  88. :End
  89.