Advertisement
Guest User

2YE change script

a guest
Dec 18th, 2015
614
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 13.99 KB | None | 0 0
  1. @echo off
  2. setlocal
  3.  
  4. call :FindReplace "</body>" "<hr /><a href=chapter_002.html>Next</a></body>" chapter_001.html
  5. call :FindReplace "<body>" "<body><a href=chapter_001.html>Previous</a><hr />" chapter_002.html
  6. call :FindReplace "</body>" "<hr /><a href=chapter_003.html>Next</a></body>" chapter_002.html
  7. call :FindReplace "<body>" "<body><a href=chapter_002.html>Previous</a><hr />" chapter_003.html
  8. call :FindReplace "</body>" "<hr /><a href=chapter_004.html>Next</a></body>" chapter_003.html
  9. call :FindReplace "<body>" "<body><a href=chapter_003.html>Previous</a><hr />" chapter_004.html
  10. call :FindReplace "</body>" "<hr /><a href=chapter_005.html>Next</a></body>" chapter_004.html
  11. call :FindReplace "<body>" "<body><a href=chapter_004.html>Previous</a><hr />" chapter_005.html
  12. call :FindReplace "</body>" "<hr /><a href=chapter_006.html>Next</a></body>" chapter_005.html
  13. call :FindReplace "<body>" "<body><a href=chapter_005.html>Previous</a><hr />" chapter_006.html
  14. call :FindReplace "</body>" "<hr /><a href=chapter_007.html>Next</a></body>" chapter_006.html
  15. call :FindReplace "<body>" "<body><a href=chapter_006.html>Previous</a><hr />" chapter_007.html
  16. call :FindReplace "</body>" "<hr /><a href=chapter_008.html>Next</a></body>" chapter_007.html
  17. call :FindReplace "<body>" "<body><a href=chapter_007.html>Previous</a><hr />" chapter_008.html
  18. call :FindReplace "</body>" "<hr /><a href=chapter_009.html>Next</a></body>" chapter_008.html
  19. call :FindReplace "<body>" "<body><a href=chapter_008.html>Previous</a><hr />" chapter_009.html
  20. call :FindReplace "</body>" "<hr /><a href=chapter_010.html>Next</a></body>" chapter_009.html
  21. call :FindReplace "<body>" "<body><a href=chapter_09.html>Previous</a><hr />" chapter_010.html
  22. call :FindReplace "</body>" "<hr /><a href=chapter_011.html>Next</a></body>" chapter_010.html
  23. call :FindReplace "<body>" "<body><a href=chapter_010.html>Previous</a><hr />" chapter_011.html
  24. call :FindReplace "</body>" "<hr /><a href=chapter_012.html>Next</a></body>" chapter_011.html
  25. call :FindReplace "<body>" "<body><a href=chapter_011.html>Previous</a><hr />" chapter_012.html
  26. call :FindReplace "</body>" "<hr /><a href=chapter_013.html>Next</a></body>" chapter_012.html
  27. call :FindReplace "<body>" "<body><a href=chapter_012.html>Previous</a><hr />" chapter_013.html
  28. call :FindReplace "</body>" "<hr /><a href=chapter_014.html>Next</a></body>" chapter_013.html
  29. call :FindReplace "<body>" "<body><a href=chapter_013.html>Previous</a><hr />" chapter_014.html
  30. call :FindReplace "</body>" "<hr /><a href=chapter_015.html>Next</a></body>" chapter_014.html
  31. call :FindReplace "<body>" "<body><a href=chapter_014.html>Previous</a><hr />" chapter_015.html
  32. call :FindReplace "</body>" "<hr /><a href=chapter_016.html>Next</a></body>" chapter_015.html
  33. call :FindReplace "<body>" "<body><a href=chapter_015.html>Previous</a><hr />" chapter_016.html
  34. call :FindReplace "</body>" "<hr /><a href=chapter_017.html>Next</a></body>" chapter_016.html
  35. call :FindReplace "<body>" "<body><a href=chapter_016.html>Previous</a><hr />" chapter_017.html
  36. call :FindReplace "</body>" "<hr /><a href=chapter_018.html>Next</a></body>" chapter_017.html
  37. call :FindReplace "<body>" "<body><a href=chapter_017.html>Previous</a><hr />" chapter_018.html
  38. call :FindReplace "</body>" "<hr /><a href=chapter_019.html>Next</a></body>" chapter_018.html
  39. call :FindReplace "<body>" "<body><a href=chapter_018.html>Previous</a><hr />" chapter_019.html
  40. call :FindReplace "</body>" "<hr /><a href=chapter_020.html>Next</a></body>" chapter_019.html
  41. call :FindReplace "<body>" "<body><a href=chapter_019.html>Previous</a><hr />" chapter_020.html
  42. call :FindReplace "</body>" "<hr /><a href=chapter_021.html>Next</a></body>" chapter_020.html
  43. call :FindReplace "<body>" "<body><a href=chapter_020.html>Previous</a><hr />" chapter_021.html
  44. call :FindReplace "</body>" "<hr /><a href=chapter_022.html>Next</a></body>" chapter_021.html
  45. call :FindReplace "<body>" "<body><a href=chapter_021.html>Previous</a><hr />" chapter_022.html
  46. call :FindReplace "</body>" "<hr /><a href=chapter_023.html>Next</a></body>" chapter_022.html
  47. call :FindReplace "<body>" "<body><a href=chapter_022.html>Previous</a><hr />" chapter_023.html
  48. call :FindReplace "</body>" "<hr /><a href=chapter_024.html>Next</a></body>" chapter_023.html
  49. call :FindReplace "<body>" "<body><a href=chapter_023.html>Previous</a><hr />" chapter_024.html
  50. call :FindReplace "</body>" "<hr /><a href=chapter_025.html>Next</a></body>" chapter_024.html
  51. call :FindReplace "<body>" "<body><a href=chapter_024.html>Previous</a><hr />" chapter_025.html
  52. call :FindReplace "</body>" "<hr /><a href=chapter_026.html>Next</a></body>" chapter_025.html
  53. call :FindReplace "<body>" "<body><a href=chapter_025.html>Previous</a><hr />" chapter_026.html
  54. call :FindReplace "</body>" "<hr /><a href=chapter_027.html>Next</a></body>" chapter_026.html
  55. call :FindReplace "<body>" "<body><a href=chapter_026.html>Previous</a><hr />" chapter_027.html
  56. call :FindReplace "</body>" "<hr /><a href=chapter_028.html>Next</a></body>" chapter_027.html
  57. call :FindReplace "<body>" "<body><a href=chapter_027.html>Previous</a><hr />" chapter_028.html
  58. call :FindReplace "</body>" "<hr /><a href=chapter_029.html>Next</a></body>" chapter_028.html
  59. call :FindReplace "<body>" "<body><a href=chapter_028.html>Previous</a><hr />" chapter_029.html
  60. call :FindReplace "</body>" "<hr /><a href=chapter_030.html>Next</a></body>" chapter_029.html
  61. call :FindReplace "<body>" "<body><a href=chapter_029.html>Previous</a><hr />" chapter_030.html
  62. call :FindReplace "</body>" "<hr /><a href=chapter_031.html>Next</a></body>" chapter_030.html
  63. call :FindReplace "<body>" "<body><a href=chapter_030.html>Previous</a><hr />" chapter_031.html
  64. call :FindReplace "</body>" "<hr /><a href=chapter_032.html>Next</a></body>" chapter_031.html
  65. call :FindReplace "<body>" "<body><a href=chapter_031.html>Previous</a><hr />" chapter_032.html
  66. call :FindReplace "</body>" "<hr /><a href=chapter_033.html>Next</a></body>" chapter_032.html
  67. call :FindReplace "<body>" "<body><a href=chapter_032.html>Previous</a><hr />" chapter_033.html
  68. call :FindReplace "</body>" "<hr /><a href=chapter_034.html>Next</a></body>" chapter_033.html
  69. call :FindReplace "<body>" "<body><a href=chapter_033.html>Previous</a><hr />" chapter_034.html
  70. call :FindReplace "</body>" "<hr /><a href=chapter_035.html>Next</a></body>" chapter_034.html
  71. call :FindReplace "<body>" "<body><a href=chapter_034.html>Previous</a><hr />" chapter_035.html
  72. call :FindReplace "</body>" "<hr /><a href=chapter_036.html>Next</a></body>" chapter_035.html
  73. call :FindReplace "<body>" "<body><a href=chapter_035.html>Previous</a><hr />" chapter_036.html
  74. call :FindReplace "</body>" "<hr /><a href=chapter_037.html>Next</a></body>" chapter_036.html
  75. call :FindReplace "<body>" "<body><a href=chapter_036.html>Previous</a><hr />" chapter_037.html
  76. call :FindReplace "</body>" "<hr /><a href=chapter_038.html>Next</a></body>" chapter_037.html
  77. call :FindReplace "<body>" "<body><a href=chapter_037.html>Previous</a><hr />" chapter_038.html
  78. call :FindReplace "</body>" "<hr /><a href=chapter_039.html>Next</a></body>" chapter_038.html
  79. call :FindReplace "<body>" "<body><a href=chapter_038.html>Previous</a><hr />" chapter_039.html
  80. call :FindReplace "</body>" "<hr /><a href=chapter_040.html>Next</a></body>" chapter_039.html
  81. call :FindReplace "<body>" "<body><a href=chapter_039.html>Previous</a><hr />" chapter_040.html
  82. call :FindReplace "</body>" "<hr /><a href=chapter_041.html>Next</a></body>" chapter_040.html
  83. call :FindReplace "<body>" "<body><a href=chapter_040.html>Previous</a><hr />" chapter_041.html
  84. call :FindReplace "</body>" "<hr /><a href=chapter_042.html>Next</a></body>" chapter_041.html
  85. call :FindReplace "<body>" "<body><a href=chapter_041.html>Previous</a><hr />" chapter_042.html
  86. call :FindReplace "</body>" "<hr /><a href=chapter_043.html>Next</a></body>" chapter_042.html
  87. call :FindReplace "<body>" "<body><a href=chapter_042.html>Previous</a><hr />" chapter_043.html
  88. call :FindReplace "</body>" "<hr /><a href=chapter_044.html>Next</a></body>" chapter_043.html
  89. call :FindReplace "<body>" "<body><a href=chapter_043.html>Previous</a><hr />" chapter_044.html
  90. call :FindReplace "</body>" "<hr /><a href=chapter_045.html>Next</a></body>" chapter_044.html
  91. call :FindReplace "<body>" "<body><a href=chapter_044.html>Previous</a><hr />" chapter_045.html
  92. call :FindReplace "</body>" "<hr /><a href=chapter_046.html>Next</a></body>" chapter_045.html
  93. call :FindReplace "<body>" "<body><a href=chapter_045.html>Previous</a><hr />" chapter_046.html
  94. call :FindReplace "</body>" "<hr /><a href=chapter_047.html>Next</a></body>" chapter_046.html
  95. call :FindReplace "<body>" "<body><a href=chapter_046.html>Previous</a><hr />" chapter_047.html
  96. call :FindReplace "</body>" "<hr /><a href=chapter_048.html>Next</a></body>" chapter_047.html
  97. call :FindReplace "<body>" "<body><a href=chapter_047.html>Previous</a><hr />" chapter_048.html
  98. call :FindReplace "</body>" "<hr /><a href=chapter_049.html>Next</a></body>" chapter_048.html
  99. call :FindReplace "<body>" "<body><a href=chapter_048.html>Previous</a><hr />" chapter_049.html
  100. call :FindReplace "</body>" "<hr /><a href=chapter_050.html>Next</a></body>" chapter_049.html
  101. call :FindReplace "<body>" "<body><a href=chapter_049.html>Previous</a><hr />" chapter_050.html
  102. call :FindReplace "</body>" "<hr /><a href=chapter_051.html>Next</a></body>" chapter_050.html
  103. call :FindReplace "<body>" "<body><a href=chapter_050.html>Previous</a><hr />" chapter_051.html
  104. call :FindReplace "</body>" "<hr /><a href=chapter_052.html>Next</a></body>" chapter_051.html
  105. call :FindReplace "<body>" "<body><a href=chapter_051.html>Previous</a><hr />" chapter_052.html
  106. call :FindReplace "</body>" "<hr /><a href=chapter_053.html>Next</a></body>" chapter_052.html
  107. call :FindReplace "<body>" "<body><a href=chapter_052.html>Previous</a><hr />" chapter_053.html
  108. call :FindReplace "</body>" "<hr /><a href=chapter_054.html>Next</a></body>" chapter_053.html
  109. call :FindReplace "<body>" "<body><a href=chapter_053.html>Previous</a><hr />" chapter_054.html
  110. call :FindReplace "</body>" "<hr /><a href=chapter_055.html>Next</a></body>" chapter_054.html
  111. call :FindReplace "<body>" "<body><a href=chapter_054.html>Previous</a><hr />" chapter_055.html
  112. call :FindReplace "</body>" "<hr /><a href=chapter_056.html>Next</a></body>" chapter_055.html
  113. call :FindReplace "<body>" "<body><a href=chapter_055.html>Previous</a><hr />" chapter_056.html
  114. call :FindReplace "</body>" "<hr /><a href=chapter_057.html>Next</a></body>" chapter_056.html
  115. call :FindReplace "<body>" "<body><a href=chapter_056.html>Previous</a><hr />" chapter_057.html
  116. call :FindReplace "</body>" "<hr /><a href=chapter_058.html>Next</a></body>" chapter_057.html
  117. call :FindReplace "<body>" "<body><a href=chapter_057.html>Previous</a><hr />" chapter_058.html
  118. call :FindReplace "</body>" "<hr /><a href=chapter_059.html>Next</a></body>" chapter_058.html
  119. call :FindReplace "<body>" "<body><a href=chapter_058.html>Previous</a><hr />" chapter_059.html
  120. call :FindReplace "</body>" "<hr /><a href=chapter_060.html>Next</a></body>" chapter_059.html
  121. call :FindReplace "<body>" "<body><a href=chapter_059.html>Previous</a><hr />" chapter_060.html
  122. call :FindReplace "</body>" "<hr /><a href=chapter_061.html>Next</a></body>" chapter_060.html
  123. call :FindReplace "<body>" "<body><a href=chapter_060.html>Previous</a><hr />" chapter_061.html
  124. call :FindReplace "</body>" "<hr /><a href=chapter_062.html>Next</a></body>" chapter_061.html
  125. call :FindReplace "<body>" "<body><a href=chapter_061.html>Previous</a><hr />" chapter_062.html
  126. call :FindReplace "</body>" "<hr /><a href=chapter_063.html>Next</a></body>" chapter_062.html
  127. call :FindReplace "<body>" "<body><a href=chapter_062.html>Previous</a><hr />" chapter_063.html
  128. call :FindReplace "</body>" "<hr /><a href=chapter_064.html>Next</a></body>" chapter_063.html
  129. call :FindReplace "<body>" "<body><a href=chapter_063.html>Previous</a><hr />" chapter_064.html
  130. call :FindReplace "</body>" "<hr /><a href=chapter_065.html>Next</a></body>" chapter_064.html
  131. call :FindReplace "<body>" "<body><a href=chapter_064.html>Previous</a><hr />" chapter_065.html
  132. call :FindReplace "</body>" "<hr /><a href=chapter_066.html>Next</a></body>" chapter_065.html
  133. call :FindReplace "<body>" "<body><a href=chapter_065.html>Previous</a><hr />" chapter_066.html
  134. call :FindReplace "</body>" "<hr /><a href=chapter_067.html>Next</a></body>" chapter_066.html
  135. call :FindReplace "<body>" "<body><a href=chapter_066.html>Previous</a><hr />" chapter_067.html
  136. call :FindReplace "</body>" "<hr /><a href=chapter_068.html>Next</a></body>" chapter_067.html
  137. call :FindReplace "<body>" "<body><a href=chapter_067.html>Previous</a><hr />" chapter_068.html
  138. call :FindReplace "</body>" "<hr /><a href=chapter_069.html>Next</a></body>" chapter_068.html
  139. call :FindReplace "<body>" "<body><a href=chapter_068.html>Previous</a><hr />" chapter_069.html
  140. call :FindReplace "</body>" "<hr /><a href=chapter_070.html>Next</a></body>" chapter_069.html
  141. call :FindReplace "<body>" "<body><a href=chapter_069.html>Previous</a><hr />" chapter_070.html
  142. call :FindReplace "</body>" "<hr /><a href=chapter_071.html>Next</a></body>" chapter_070.html
  143. call :FindReplace "<body>" "<body><a href=chapter_070.html>Previous</a><hr />" chapter_071.html
  144. call :FindReplace "</body>" "<hr /><a href=chapter_072.html>Next</a></body>" chapter_071.html
  145. call :FindReplace "<body>" "<body><a href=chapter_071.html>Previous</a><hr />" chapter_072.html
  146.  
  147. exit /b
  148.  
  149.  
  150. :FindReplace <findstr> <replstr> <file>
  151. set tmp="%temp%\tmp.txt"
  152. If not exist %temp%\_.vbs call :MakeReplace
  153. for /f "tokens=*" %%a in ('dir "%3" /s /b /a-d /on') do (
  154.   for /f "usebackq" %%b in (`Findstr /mic:"%~1" "%%a"`) do (
  155.     echo(&Echo Replacing "%~1" with "%~2" in file %%~nxa
  156.     <%%a cscript //nologo %temp%\_.vbs "%~1" "%~2">%tmp%
  157.     if exist %tmp% move /Y %tmp% "%%~dpnxa">nul
  158.   )
  159. )
  160. del %temp%\_.vbs
  161. exit /b
  162.  
  163. :MakeReplace
  164. >%temp%\_.vbs echo with Wscript
  165. >>%temp%\_.vbs echo set args=.arguments
  166. >>%temp%\_.vbs echo .StdOut.Write _
  167. >>%temp%\_.vbs echo Replace(.StdIn.ReadAll,args(0),args(1),1,-1,1)
  168. >>%temp%\_.vbs echo end with
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement