change.bat 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 /a sum=0
  11. for %%m in (*) do (
  12. if "%%m"=="m-manifest.json" (
  13. set isMobile=mobile
  14. )
  15. )
  16. echo %isMobile%
  17. if "%isMobile%"=="mobile" (
  18. echo %isMobile%
  19. for %%z in (*) do (
  20. echo %%z
  21. if "%%z"=="manifest.json" (
  22. ren %%z %business%%%z
  23. set /a sum+=1
  24. )
  25. if "%%z"=="pages.json" (
  26. ren %%z %business%%%z
  27. set /a sum+=1
  28. )
  29. if "%%z"=="config.js" (
  30. ren %%z %business%%%z
  31. set /a sum+=1
  32. )
  33. )
  34. echo,
  35. for %%z in (*) do (
  36. echo %%z
  37. if "%%z"=="m-manifest.json" (
  38. ren %%z %manifest%
  39. set /a sum+=1
  40. )
  41. if "%%z"=="m-pages.json" (
  42. ren %%z %pages%
  43. set /a sum+=1
  44. )
  45. if "%%z"=="m-config.js" (
  46. ren %%z %config%
  47. set /a sum+=1
  48. )
  49. )
  50. ) else (
  51. echo %isMobile%
  52. for %%z in (*) do (
  53. echo %%z
  54. if "%%z"=="manifest.json" (
  55. ren %%z %mobile%%%z
  56. set /a sum+=1
  57. )
  58. if "%%z"=="pages.json" (
  59. ren %%z %mobile%%%z
  60. set /a sum+=1
  61. )
  62. if "%%z"=="config.js" (
  63. ren %%z %mobile%%%z
  64. set /a sum+=1
  65. )
  66. )
  67. echo,
  68. for %%z in (*) do (
  69. echo %%z
  70. if "%%z"=="b-manifest.json" (
  71. ren %%z %manifest%
  72. set /a sum+=1
  73. )
  74. if "%%z"=="b-pages.json" (
  75. ren %%z %pages%
  76. set /a sum+=1
  77. )
  78. if "%%z"=="b-config.js" (
  79. ren %%z %config%
  80. set /a sum+=1
  81. )
  82. )
  83. )
  84. echo,
  85. echo file change success to ********* %isMobile%
  86. echo,
  87. echo ****************** ljd ********************
  88. echo,
  89. echo end ****** %sum% ****** file is change confirm
  90. echo,
  91. echo ****************** jmq *******************
  92. echo,
  93. set isMobile=
  94. set mobile=
  95. set business=
  96. set manifest=
  97. set pages=
  98. set config=
  99. set sum=
  100. PAUSE