@echo off
echo start......
echo,
set isMobile=business
set mobile=m-
set business=b-
set manifest=manifest.json
set pages=pages.json
set config=config.js
set uni=uni.scss
set /a sum=0

for %%m in (*) do (
	if "%%m"=="m-manifest.json" (
		set isMobile=mobile
	)
)

echo %isMobile%

if "%isMobile%"=="mobile" (
	echo %isMobile%
	for %%z in (*) do (
		echo %%z
		if "%%z"=="manifest.json" (
			ren %%z %business%%%z
			set /a sum+=1
		)
		if "%%z"=="pages.json" (
			ren %%z %business%%%z
			set /a sum+=1
			
		)
		if "%%z"=="config.js" (
			ren %%z %business%%%z
			set /a sum+=1
		)
		if "%%z"=="uni.scss" (
			ren %%z %business%%%z
			set /a sum+=1
		)
	)
	echo,
	for %%z in (*) do (
		echo %%z
		if "%%z"=="m-manifest.json" (
			ren %%z %manifest%
			set /a sum+=1
		)
		if "%%z"=="m-pages.json" (
			ren %%z %pages%
			set /a sum+=1
		)
		if "%%z"=="m-config.js" (
			ren %%z %config%
			set /a sum+=1
		)
		if "%%z"=="m-uni.scss" (
			ren %%z %uni%
			set /a sum+=1
		)
	)
) else (
	echo %isMobile%
	for %%z in (*) do (
		echo %%z
		if "%%z"=="manifest.json" (
			ren %%z %mobile%%%z
			set /a sum+=1
		)
		if "%%z"=="pages.json" (
			ren %%z %mobile%%%z
			set /a sum+=1
		)
		if "%%z"=="config.js" (
			ren %%z %mobile%%%z
			set /a sum+=1
		)
		if "%%z"=="uni.scss" (
			ren %%z %mobile%%%z
			set /a sum+=1
		)
	)
	echo,
	for %%z in (*) do (
		echo %%z
		if "%%z"=="b-manifest.json" (
			ren %%z %manifest%
			set /a sum+=1
		)
		if "%%z"=="b-pages.json" (
			ren %%z %pages%
			set /a sum+=1
		)
		if "%%z"=="b-config.js" (
			ren %%z %config%
			set /a sum+=1
		)
		if "%%z"=="b-uni.scss" (
			ren %%z %uni%
			set /a sum+=1
		)
	)
)
echo,
echo file change success to *********    %isMobile%
echo,
echo ******************  ljd  ********************
echo,
echo end ******  %sum%  ****** file is change confirm
echo,
echo ******************  jmq  ********************
echo,
set isMobile=
set mobile=
set business=
set manifest=
set pages=
set config=
set sum=
PAUSE