@echo off
echo start......
echo,
set isMobile=mobile
set mobile=m-
set official=w-
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"=="w-manifest.json" (
		set isMobile=official
	)
)

echo %isMobile%

if "%isMobile%"=="official" (
	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"=="w-manifest.json" (
			ren %%z %manifest%
			set /a sum+=1
		)
		if "%%z"=="w-pages.json" (
			ren %%z %pages%
			set /a sum+=1
		)
		if "%%z"=="w-config.js" (
			ren %%z %config%
			set /a sum+=1
		)
		if "%%z"=="w-uni.scss" (
			ren %%z %uni%
			set /a sum+=1
		)
	)
) else (
	echo %isMobile%
	for %%z in (*) do (
		echo %%z
		if "%%z"=="manifest.json" (
			ren %%z %official%%%z
			set /a sum+=1
		)
		if "%%z"=="pages.json" (
			ren %%z %official%%%z
			set /a sum+=1
		)
		if "%%z"=="config.js" (
			ren %%z %official%%%z
			set /a sum+=1
		)
		if "%%z"=="uni.scss" (
			ren %%z %official%%%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
		)
	)
)
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 official=
set manifest=
set pages=
set config=
set sum=
PAUSE