-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopen_new.cmd
More file actions
29 lines (29 loc) · 900 Bytes
/
open_new.cmd
File metadata and controls
29 lines (29 loc) · 900 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
@echo off
REM Set Sketchbook'sbook' to YOUR directory, and following 'srcdir' the folder holding these TSET files
set sbook=T:\tCode
set srcdir=T:\Programs\TSet
set bar=.
Choice /C yn /M "Sketchbook Subfolder"
If Errorlevel 2 Goto finish
If Errorlevel 1 Goto mkfold
:mkfold
pushd %sbook%
dir /ad /d %sbook%\
echo Enter Path in %sbook% [New or with tab completion]
set /p bar=
if not exist %sbook%\%bar%\. md %bar%
:finish
echo Enter Sketch Name -without extension!
set /p foo=
if not exist %sbook%\%bar%\%foo%\. md %sbook%\%bar%\%foo%
if exist %sbook%\%bar%\%foo%\%foo%.ino echo File already exists
if not exist %sbook%\%bar%\%foo%\%foo%.ino copy %srcdir%\new_ino.ino %sbook%\%bar%\%foo%\%foo%.ino
Choice /C yn /M "Create Compile.cmd"
If Errorlevel 2 Goto nowexit
rem If Errorlevel 1
cd %sbook%\%bar%\%foo%
start /w %srcdir%\TSet.cmd %foo%.ino
:nowexit
start %sbook%\%bar%\%foo%\%foo%.ino
popd
exit