home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 January / PCO0198.ISO / filesbbs / dos / maketic.exe / MAKETIC.BAT < prev    next >
Encoding:
DOS Batch File  |  1997-11-08  |  3.6 KB  |  136 lines

  1. @echo off
  2. echo ──════[ R0SE's TIC Filegenerator ■ 0.22 ■ (C)0ded 1995-97 by R0SE ]═════──
  3. echo.
  4. goto norem
  5. ----------------------------------------------------------------------------
  6.  - 12.95   0.01    rar initial creation
  7. 14.01.96   0.02    rar, added handling of namefile, bug: fild_diz fixed!
  8.                    added /ra option for Wolfgang Beck
  9. 02.02.96   0.03    rar, if exist filename added
  10. 10.02.96   0.03a   rar, FILE_ID deleted if the file exists.
  11. 21.02.96   0.03b   rar, added .EXE support
  12. 28.09.96   0.10    rar, added multiple CFG Files, DESC/LDESC, new crc32.exe
  13. 13.10.96   0.10    rar, CRC32 - now with REPLACES handling
  14. Dez. 96    0.20    rar, FREQ & REQUESTTIME added.
  15. 02.08.97   0.21    rar, added .TAZ (tar+gzip) handling
  16. 04.10.97   0.22    rar, angepasst an NDOS 7.00 (move)
  17. ----------------------------------------------------------------------------
  18.  
  19. :norem
  20. if [%1] == [] goto error
  21. echo ■ Checking files for processing %1 ...
  22. if not exist %1 goto error
  23.  
  24. if not exist %2.cfg goto normalcfg
  25. echo ■ Using config file %2.cfg
  26. copy %2.cfg rose.tic > nul
  27. goto cfgweiter
  28.  
  29. :normalcfg
  30. echo ■ Using standard config file ROSETIC.CFG
  31. copy rosetic.cfg rose.tic > nul
  32.  
  33. :cfgweiter
  34. if exist file_id.diz del file_id.diz > nul
  35.  
  36. rem --- [EXT.BAT] ----------------------------------------------------------
  37. if exist ext~hlp.tmp\. rd ext~hlp~.tmp > nul
  38. md ext~hlp~.tmp > nul
  39. cd ext~hlp~.tmp > nul
  40. rem > %1
  41. ren *.* *.
  42. for %%a in (*.) do set namefile=%%a
  43. for %%a in (*.) do del %%a > nul
  44. cd ..
  45. rd ext~hlp~.tmp > nul
  46.  
  47. if [%namefile%]==[] goto error
  48.  
  49. rem --- [UNPACK.BAT] ------------------------------------------------------
  50. if not exist %namefile%.exe goto no_exe
  51. set E=EXE
  52. goto end
  53.  
  54. :no_exe
  55. if not exist %namefile%.arj goto no_arj
  56. arj e %namefile% FILE_ID.DIZ > nul
  57. set E=ARJ
  58. goto end
  59.  
  60. :no_arj
  61. if not exist %namefile%.lzh goto no_lha
  62. lha e %namefile% FILE_ID.DIZ > nul
  63. set E=LZH
  64. goto end
  65.  
  66. :no_lha
  67. if not exist %namefile%.zip goto targzip
  68. pkunzip %namefile% FILE_ID.DIZ > nul
  69. set E=ZIP
  70. goto end
  71.  
  72. :targzip
  73. rem GNU ZIP'ed tar archives
  74. if not exist %namefile%.taz goto no_zip
  75. gzip -dc %namefile%.taz | tar xvf - file_id.diz > nul
  76. set E=TAZ
  77. goto end
  78.  
  79.  
  80. :no_zip
  81. rem [Last in line]
  82. if not exist %namefile%.rar goto error
  83. rar e %namefile% FILE_ID.DIZ > nul
  84. set E=RAR
  85.  
  86. rem --- [ Main ] ------------------------------------------------------
  87. :end
  88.  
  89. if exist file_id.diz goto founddiz
  90. rem [hier eigenen Text einfügen]
  91.  
  92. echo ■ No FILE_ID.DIZ found. Creating empty DESC entry!
  93. echo No description for %namefile% available! > file_id.diz
  94. echo DIZ insert by ROSE's TIC Maker >> file_id.diz
  95.  
  96. :founddiz
  97.  
  98. for %%a in (-ra -RA /ra /RA) do if [%%a]==[%2] goto RemoteA1
  99. for %%a in (-ra -RA /ra /RA) do if [%%a]==[%3] goto RemoteA1
  100.  
  101. crc32 %namefile%.%E% >> rose.tic
  102. del file_id.diz > nul
  103. echo. >> rose.tic
  104. echo Created by ROSE's TIC Maker, request MAKETIC.RAR >> rose.tic
  105. copy rose.tic %namefile%.tic > nul
  106. del rose.tic > nul
  107. goto end2
  108.  
  109. rem --- [RemoteAccess, 14.01.96] ---------------------------------------
  110. rem Fuer Wolfgang Beck
  111. :RemoteA1
  112.  
  113. echo ■ Makeing now file %namefile%.TXT
  114. move file_id.diz %namefile%.txt >nul
  115. goto end2
  116.  
  117. :error
  118.  
  119. echo Usage: maketic  archiv.ext  [Cfg-File]  [-ra or -RA]
  120. echo.
  121. echo Extension must be: .EXE/.ARJ/.ZIP./LZH/.RAR
  122. echo Cfg-File must end with .CFG and contains basic commands (default: ROSETIC.CFG)
  123. echo.
  124. echo The option -ra generates for Remote Access the file ARCHIVE.TXT
  125. goto final
  126.  
  127. :end2
  128. echo ■ CleanUp, check %namefile%.TIC ...
  129. set e=
  130. set namefile=
  131. if exist ROSE.TIC del ROSE.TIC > nul
  132. if exist FILE_ID.DIZ del FILE_ID.DIZ > nul
  133.  
  134. :final
  135. echo.
  136.