::############################################################
::													         #
:: Name: CompactPyp(PNG).bat	                                     #
::                                                           #
:: Author: Jefferson Oliveira (jefferson.oliveira@irtbr.com) #
:: Data: 03/23/2021                                          #
::                                                           #
:: Description: The scrip consist of generating each file    #
::			  to be inserted in the PYP servers 		 	 #
::                                                           #
:: Use: CompactPyp(PNG).bat                                  #
::                                                           #
::############################################################
@echo off
mode 70,30
echo.	=============================================
echo.		Scrit for PYP PNG Brazil
echo.		Development Enginnering Validation 
echo.	=============================================
timeout 2
mkdir results
cd results
SET var1=%cd%
cd ..
timeout 1

cd 2_segunda 24
start /b CreatePicoYPlacaFilesBashScript.bat tgg
echo. "## WAIT! ##
timeout 4
cd Result 
SET var2=%cd%
copy picoyPlacaRegions.txt "%var2%"\PYP_1_Regions.txt
copy picoyPlacaRegions.txt "%var2%"\PYP_2_Regions.txt
copy picoyPlacaRules.txt "%var2%"\PYP_1_Rules.txt
copy picoyPlacaRules.txt "%var2%"\PYP_2_Rules.txt
copy "PYP_1_Rules.txt" "%var1%"
copy "PYP_2_Rules.txt" "%var1%"
copy "PYP_1_Regions.txt" "%var1%"
copy "PYP_2_Regions.txt" "%var1%"
cd ..
cd ..

cd 3_terca
start /b CreatePicoYPlacaFilesBashScript.bat tgg
echo. "## WAIT! ##
timeout 4
cd Result 
SET var2=%cd%
copy picoyPlacaRegions.txt "%var2%"\PYP_3_Regions.txt
copy picoyPlacaRegions.txt "%var2%"\PYP_4_Regions.txt
copy picoyPlacaRules.txt "%var2%"\PYP_3_Rules.txt
copy picoyPlacaRules.txt "%var2%"\PYP_4_Rules.txt
copy "PYP_3_Rules.txt" "%var1%"
copy "PYP_4_Rules.txt" "%var1%"
copy "PYP_3_Regions.txt" "%var1%"
copy "PYP_4_Regions.txt" "%var1%"
cd ..
cd ..

cd 4_quarta
start /b CreatePicoYPlacaFilesBashScript.bat tgg
echo. "## WAIT! ##
timeout 4
cd Result 
SET var2=%cd%
copy picoyPlacaRegions.txt "%var2%"\PYP_5_Regions.txt
copy picoyPlacaRegions.txt "%var2%"\PYP_6_Regions.txt
copy picoyPlacaRules.txt "%var2%"\PYP_5_Rules.txt
copy picoyPlacaRules.txt "%var2%"\PYP_6_Rules.txt
copy "PYP_5_Rules.txt" "%var1%"
copy "PYP_6_Rules.txt" "%var1%"
copy "PYP_5_Regions.txt" "%var1%"
copy "PYP_6_Regions.txt" "%var1%"
cd ..
cd ..

cd 5_quinta
start /b CreatePicoYPlacaFilesBashScript.bat tgg
echo. "## WAIT! ##
timeout 4
cd Result 
SET var2=%cd%
copy picoyPlacaRegions.txt "%var2%"\PYP_7_Regions.txt
copy picoyPlacaRegions.txt "%var2%"\PYP_8_Regions.txt
copy picoyPlacaRules.txt "%var2%"\PYP_7_Rules.txt
copy picoyPlacaRules.txt "%var2%"\PYP_8_Rules.txt
copy "PYP_7_Rules.txt" "%var1%"
copy "PYP_8_Rules.txt" "%var1%"
copy "PYP_7_Regions.txt" "%var1%"
copy "PYP_8_Regions.txt" "%var1%"
cd ..
cd ..

cd 6_sexta
start /b CreatePicoYPlacaFilesBashScript.bat tgg
echo. "## WAIT! ##
timeout 4
cd Result 
SET var2=%cd%
copy picoyPlacaRegions.txt "%var2%"\PYP_9_Regions.txt
copy picoyPlacaRegions.txt "%var2%"\PYP_0_Regions.txt
copy picoyPlacaRules.txt "%var2%"\PYP_9_Rules.txt
copy picoyPlacaRules.txt "%var2%"\PYP_0_Rules.txt
copy "PYP_9_Rules.txt" "%var1%"
copy "PYP_0_Rules.txt" "%var1%"
copy "PYP_9_Regions.txt" "%var1%"
copy "PYP_0_Regions.txt" "%var1%"

echo.	====================
echo.		Finished
echo.	====================

pause