mirror of
https://github.com/ADElectronics/RTL00_WEB_WS2812.git
synced 2024-12-04 19:00:31 +00:00
161 lines
No EOL
3.9 KiB
Batchfile
161 lines
No EOL
3.9 KiB
Batchfile
@echo off
|
||
title Finalizing Outputs X-Layers Edition v2.1a by A_D
|
||
|
||
set ReadMeFile="_Read Me.txt"
|
||
set LayersNum=2
|
||
echo ----------------------------------------- Clearing root dir.
|
||
for /r %%x in (*.Dat) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
for /r %%x in (*.PrjPCBStructure) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
for /r %%x in (*.htm) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
echo ----------------------------------------- Clearing "__Previews" dir.
|
||
if not exist __Previews/*.* goto PreviewsDirClear
|
||
cd __Previews
|
||
for /r %%x in (*.PcbDocPreview) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
for /r %%x in (*.SchDocPreview) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
cd ..
|
||
:PreviewsDirClear
|
||
rd __Previews
|
||
|
||
echo ----------------------------------------- Clearing "_Logs" dir.
|
||
if not exist _Logs/*.* (
|
||
echo No "_Logs" dir Found.
|
||
goto LogsClearEnd
|
||
)
|
||
|
||
cd _Logs
|
||
for /r %%x in (*.LOG) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
cd ..
|
||
rd _Logs
|
||
|
||
:LogsClearEnd
|
||
echo ----------------------------------------- Clearing "_Outputs" dir.
|
||
if not exist _Outputs/*.* (
|
||
echo No "_Outputs" dir Found.
|
||
goto LayerSetEnd
|
||
)
|
||
cd _Outputs
|
||
|
||
if exist "Status Report.Txt" (echo Delete "Status Report.Txt"
|
||
del "Status Report.Txt")
|
||
|
||
for /r %%x in (*.PcbDoc) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
|
||
echo ----------------------------------------- Clearing "_Outputs\Gerbers" dir.
|
||
if not exist Gerbers/*.* (set LayersNum=0
|
||
echo No Gerber Files Found.
|
||
goto LayerSetEnd
|
||
)
|
||
|
||
cd Gerbers
|
||
|
||
for /r %%x in (*.apr) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
for /r %%x in (*.DRR) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
for /r %%x in (*.EXTREP) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
for /r %%x in (*.LDP) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
for /r %%x in (*.REP) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
for /r %%x in (*.RUL) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
for /r %%x in (*.APR_LIB) do (echo Delete "%%x"
|
||
del "%%x"
|
||
)
|
||
|
||
if exist "*.G4" (set LayersNum=6
|
||
echo Layers Count = 6 !
|
||
goto LayerSet
|
||
)
|
||
if exist "*.G2" (set LayersNum=4
|
||
echo Layers Count = 4 !
|
||
goto LayerSet
|
||
)
|
||
if not exist "*.GM1" (set LayersNum=0
|
||
echo No Gerber Files Found.
|
||
if exist %ReadMeFile% del %ReadMeFile%
|
||
cd ..
|
||
rd Gerbers
|
||
goto LayerSetEnd
|
||
)
|
||
|
||
if %LayersNum%==2 (
|
||
echo Default Layers Count = 2.
|
||
)
|
||
:LayerSet
|
||
echo ----------------------------------------- Generating %ReadMeFile% File.
|
||
|
||
if exist %ReadMeFile% (
|
||
echo File found. Deleted.
|
||
del %ReadMeFile%
|
||
)
|
||
|
||
if not exist %ReadMeFile% (
|
||
|
||
echo File not found, generating!
|
||
|
||
echo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>:>>%ReadMeFile%
|
||
echo *.GM1 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>>>%ReadMeFile%
|
||
echo. >>%ReadMeFile%
|
||
echo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>:>>%ReadMeFile%
|
||
echo *-Plated.TXT - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>>%ReadMeFile%
|
||
echo *-NonPlated.TXT - <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>>%ReadMeFile%
|
||
echo. >>%ReadMeFile%
|
||
echo <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:>>%ReadMeFile%
|
||
echo *.GTL - 1-<2D> <20><><EFBFBD><EFBFBD> TOP>>%ReadMeFile%
|
||
if %LayersNum%==2 echo *.GBL - 2-<2D> <20><><EFBFBD><EFBFBD> BOTTOM>>%ReadMeFile%
|
||
if %LayersNum%==4 echo *.GBL - 4-<2D> <20><><EFBFBD><EFBFBD> BOTTOM>>%ReadMeFile%
|
||
if %LayersNum%==6 echo *.GBL - 6-<2D> <20><><EFBFBD><EFBFBD> BOTTOM>>%ReadMeFile%
|
||
echo. >>%ReadMeFile%
|
||
|
||
if %LayersNum%==4 (
|
||
echo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:>>%ReadMeFile%
|
||
echo *.G1 - 2-<2D> <20><><EFBFBD><EFBFBD> MIDLAYER1>>%ReadMeFile%
|
||
echo *.G2 - 3-<2D> <20><><EFBFBD><EFBFBD> MIDLAYER2>>%ReadMeFile%
|
||
echo. >>%ReadMeFile%
|
||
)
|
||
|
||
if %LayersNum%==6 (
|
||
echo *.G1 - 2-<2D> <20><><EFBFBD><EFBFBD> MIDLAYER1>>%ReadMeFile%
|
||
echo *.G2 - 3-<2D> <20><><EFBFBD><EFBFBD> MIDLAYER2>>%ReadMeFile%
|
||
echo *.G3 - 4-<2D> <20><><EFBFBD><EFBFBD> MIDLAYER3>>%ReadMeFile%
|
||
echo *.G4 - 5-<2D> <20><><EFBFBD><EFBFBD> MIDLAYER4>>%ReadMeFile%
|
||
echo. >>%ReadMeFile%
|
||
)
|
||
|
||
echo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>:>>%ReadMeFile%
|
||
echo *.GTS - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TOP>>%ReadMeFile%
|
||
echo *.GBS - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BOTTOM>>%ReadMeFile%
|
||
echo. >>%ReadMeFile%
|
||
echo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:>>%ReadMeFile%
|
||
echo *.GTO - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TOP>>%ReadMeFile%
|
||
echo *.GBO - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BOTTOM>>%ReadMeFile%
|
||
echo. >>%ReadMeFile%
|
||
echo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:>>%ReadMeFile%
|
||
echo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.>>%ReadMeFile%
|
||
)
|
||
:LayerSetEnd
|
||
echo ----------------------------------------- End.
|
||
echo Press any key to EXIT.
|
||
pause>nul |