-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbatch_process.bat
More file actions
42 lines (33 loc) · 982 Bytes
/
batch_process.bat
File metadata and controls
42 lines (33 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@echo off
REM Batch process multiple DXF files on Windows
REM Usage: batch_process.bat [thickness] [tabs]
REM Example: batch_process.bat 0.25 4
setlocal enabledelayedexpansion
set THICKNESS=%1
if "%THICKNESS%"=="" set THICKNESS=0.25
set TABS=%2
if "%TABS%"=="" set TABS=4
echo =========================================
echo FRC CAM Batch Processor
echo =========================================
echo Material thickness: %THICKNESS%"
echo Number of tabs: %TABS%
echo.
set count=0
for %%f in (*.dxf) do (
set "dxf_file=%%f"
set "gcode_file=%%~nf.gcode"
echo Processing: !dxf_file! -^> !gcode_file!
python frc_cam_postprocessor.py "!dxf_file!" "!gcode_file!" --thickness %THICKNESS% --tabs %TABS%
if errorlevel 1 (
echo X Failed
) else (
echo V Success
set /a count+=1
)
echo.
)
echo =========================================
echo Processed %count% files
echo =========================================
pause