change.bat 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. @echo off
  2. echo start......
  3. echo,
  4. set isMobile=business
  5. set mobile=m-
  6. set business=b-
  7. set manifest=manifest.json
  8. set pages=pages.json
  9. set config=config.js
  10. set uni=uni.scss
  11. set /a sum=0
  12. for %%m in (*) do (
  13. if "%%m"=="m-manifest.json" (
  14. set isMobile=mobile
  15. )
  16. )
  17. echo %isMobile%
  18. if "%isMobile%"=="mobile" (
  19. echo %isMobile%
  20. for %%z in (*) do (
  21. echo %%z
  22. if "%%z"=="manifest.json" (
  23. ren %%z %business%%%z
  24. set /a sum+=1
  25. )
  26. if "%%z"=="pages.json" (
  27. ren %%z %business%%%z
  28. set /a sum+=1
  29. )
  30. if "%%z"=="config.js" (
  31. ren %%z %business%%%z
  32. set /a sum+=1
  33. )
  34. if "%%z"=="uni.scss" (
  35. ren %%z %business%%%z
  36. set /a sum+=1
  37. )
  38. )
  39. echo,
  40. for %%z in (*) do (
  41. echo %%z
  42. if "%%z"=="m-manifest.json" (
  43. ren %%z %manifest%
  44. set /a sum+=1
  45. )
  46. if "%%z"=="m-pages.json" (
  47. ren %%z %pages%
  48. set /a sum+=1
  49. )
  50. if "%%z"=="m-config.js" (
  51. ren %%z %config%
  52. set /a sum+=1
  53. )
  54. if "%%z"=="m-uni.scss" (
  55. ren %%z %uni%
  56. set /a sum+=1
  57. )
  58. )
  59. ) else (
  60. echo %isMobile%
  61. for %%z in (*) do (
  62. echo %%z
  63. if "%%z"=="manifest.json" (
  64. ren %%z %mobile%%%z
  65. set /a sum+=1
  66. )
  67. if "%%z"=="pages.json" (
  68. ren %%z %mobile%%%z
  69. set /a sum+=1
  70. )
  71. if "%%z"=="config.js" (
  72. ren %%z %mobile%%%z
  73. set /a sum+=1
  74. )
  75. if "%%z"=="uni.scss" (
  76. ren %%z %mobile%%%z
  77. set /a sum+=1
  78. )
  79. )
  80. echo,
  81. for %%z in (*) do (
  82. echo %%z
  83. if "%%z"=="b-manifest.json" (
  84. ren %%z %manifest%
  85. set /a sum+=1
  86. )
  87. if "%%z"=="b-pages.json" (
  88. ren %%z %pages%
  89. set /a sum+=1
  90. )
  91. if "%%z"=="b-config.js" (
  92. ren %%z %config%
  93. set /a sum+=1
  94. )
  95. if "%%z"=="b-uni.scss" (
  96. ren %%z %uni%
  97. set /a sum+=1
  98. )
  99. )
  100. )
  101. echo,
  102. echo file change success to ********* %isMobile%
  103. echo,
  104. echo ****************** ljd ********************
  105. echo,
  106. echo end ****** %sum% ****** file is change confirm
  107. echo,
  108. echo ****************** jmq ********************
  109. echo,
  110. set isMobile=
  111. set mobile=
  112. set business=
  113. set manifest=
  114. set pages=
  115. set config=
  116. set sum=
  117. PAUSE