home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / EZY200-1.ARJ / EZYBATCH.ARJ / UPCONV.BAT < prev   
DOS Batch File  |  2003-02-22  |  4KB  |  201 lines

  1. @echo off
  2. rem ********************************************
  3. rem **                                        **
  4. rem **             UpConv.Bat                 **
  5. rem **                                        **
  6. rem **      Copyright Peter Davies 1996       **
  7. rem **        All Rights Reserved             **
  8. rem **                                        **
  9. rem **    For use with Ezycom V1.20 Only      **
  10. rem **                                        **
  11. rem ********************************************
  12. echo Converting *  %5.%7 to %5.%6  *
  13. echo Testing %5.%7 for Integrity
  14.  
  15. rem If called stand alone, it checks to see if enough parameters were
  16. rem passed to the batch file
  17.  
  18. if !%6! == !! goto endit
  19.  
  20. rem This is a list of the command line in upconv.bat and doconv.bat (Ezycom)
  21.  
  22. rem %1 1                         node number
  23. rem %2 C:\EZY\SECUPLD\           where uploaded
  24. rem %3 C:\EZY\TEMP\CONV01        where it does it
  25. rem %4 C:                        drive it is on
  26. rem %5 LIST                      file name no ext
  27. rem %6 ZIP                       ext to
  28. rem %7 ARJ                       ext from (could be NULL)
  29.  
  30. :start
  31. if exist %3\*.* goto :del
  32.  
  33. rem This file has no extension, we will not archive it up, just leave it
  34. if !%7! == !! goto ENDIT
  35.  
  36. %4
  37. md %3
  38. cd %3
  39.  
  40. if !%7 == !TXT goto moveit
  41. if !%7 == !DOC goto moveit
  42. if !%7 == !LST goto moveit
  43. if !%7 == !PAS goto moveit
  44. if !%7 == !C   goto moveit
  45. if !%7 == !BAS goto moveit
  46. FOR %%A IN (LZH ZIP ARC PAK SDN ZOO ARJ SQZ RAR COM EXE) DO IF %%A == %7 GOTO WAS%7
  47. goto :finish
  48.  
  49. :moveit
  50. copy %2%5.%7 %3
  51. goto now%6
  52.  
  53. :del
  54. attrib -A -S -H -R %3\*.*
  55. echo Y | del %3\*.*
  56. rd  %3
  57. goto start
  58.  
  59. :waszip
  60. pkunzip -o %2%5.%7
  61. rem Bad Zip
  62. if errorlevel 51 goto dodel
  63. rem Disk Full
  64. if errorlevel 50 goto finish
  65. rem Bad Zip
  66. if errorlevel  9 goto dodel
  67. rem Not Enough Memory
  68. if errorlevel  4 goto finish
  69. rem Bad Zip
  70. if errorlevel  1 goto dodel
  71. rem Zip OK
  72. goto scan
  73.  
  74. :waslzh
  75. lha e /cnm %2%5.%7
  76. if errorlevel 1 goto dodel
  77. goto scan
  78.                     
  79. :wasarc
  80. PKXARC -r %2%5.%7
  81. if errorlevel 1 goto dodel
  82. goto scan
  83.  
  84. :wassdn
  85. :waspak
  86. PAK e /wa %2%5.%7
  87. if errorlevel 1 goto dodel
  88. goto scan
  89.  
  90. :wassdn
  91. :wasarj
  92. arj e -y %2%5.%7
  93. rem *** Bad ARJ
  94. if errorlevel 9 goto dodel
  95. rem *** Not enough Memory
  96. if errorlevel 8 goto finish
  97. rem *** Bad ARJ
  98. if errorlevel 6 goto dodel
  99. rem *** Disk Full
  100. if errorlevel 5 goto finish
  101. rem *** Bad ARJ
  102. if errorlevel 1 goto dodel
  103. goto scan
  104.  
  105. :waszoo
  106. ZOO -e %2%5.%7
  107. if errorlevel 1 goto dodel
  108. goto scan
  109.  
  110. :wassqz
  111. SQZ e /o1 %2%5.%7
  112. if errorlevel 1 goto dodel
  113. goto scan
  114.  
  115. :wasrar
  116. RAR e -c- -o+ -y %2%5.%7
  117. if errorlevel 1 goto dodel
  118. goto scan
  119.  
  120. :wascom
  121. :wasexe
  122. copy %2%5.%7 %3
  123. cd \
  124. SCAN /NOMEM %3
  125. if errorlevel 1 goto dodel
  126. goto finish
  127.  
  128. :dodel
  129. echo Deleting %2%5.%7 A Virus or Bad Archive
  130. del %2%5.%7
  131. goto finish
  132.  
  133. :scan
  134. if exist ..\FILE_ID.%1 del ..\FILE_ID.%1
  135. if exist DESC.SDI    copy DESC.SDI    ..\FILE_ID.%1
  136. if exist FILE_ID.DIZ copy FILE_ID.DIZ ..\FILE_ID.%1 /Y
  137. if exist FILE_ID.CLR copy FILE_ID.CLR ..\FILE_ID.%1 /Y
  138. cd \
  139. SCAN /NOMEM %3
  140. if errorlevel 1 goto dodel
  141. goto now%6
  142.  
  143. :nowzip
  144. if exist %2%5.%7 del %2%5.%7
  145. cd \
  146. pkzip -o %2%5 %3\*.*
  147. rem *** To add an archive comment use the following command
  148. rem *** pkzip -z %2%5 <c:\path\comment.txt
  149. goto finish
  150.  
  151. :nowlzh
  152. if exist %2%5.%7 del %2%5.%7
  153. cd \
  154. lha a -tm %2%5 %3\*.*
  155. goto finish
  156.  
  157. :nowarc
  158. if exist %2%5.%7 del %2%5.%7
  159. cd \
  160. pkarc -oct -a %2%5 %3\*.*
  161. goto finish
  162.  
  163. :nowpak
  164. if exist %2%5.%7 del %2%5.%7
  165. cd \
  166. pak A /O /WA /L %2%5 %3\*.*
  167. goto finish
  168.  
  169. :nowarj
  170. if exist %2%5.%7 del %2%5.%7
  171. cd \
  172. arj m -ey -jm1 %2%5 %3\*.*
  173. rem *** To add -zc:\path\comment.txt to the previous command
  174. goto finish
  175.  
  176. :nowzoo
  177. if exist %2%5.%7 del %2%5.%7
  178. cd \
  179. zoo -a %2%5 %3\*.*
  180. goto finish
  181.  
  182. :nowsqz
  183. if exist %2%5.%7 del %2%5.%7
  184. cd \
  185. sqz a /m4 /q0 %2%5 %3\*.*
  186. goto finish
  187.  
  188. :nowrar
  189. if exist %2%5.%7 del %2%5.%7
  190. cd \
  191. rar a -ep %2%5 %3\*.*
  192. goto finish
  193.  
  194. :finish
  195. cd \
  196. attrib -A -S -H -R %3\*.*
  197. echo Y | del %3\*.*
  198. rd %3
  199. :ENDIT
  200.  
  201.