@ECHO OFF
setlocal EnableDelayedExpansion

REM This is the list of all the default item ids that will be applied
SET str[1]=:280
SET str[2]=:369
SET str[3]=:352
SET str[4]=:262
SET str[5]=:287
SET str[6]=:288
SET str[7]=:289
SET str[8]=:348
SET str[9]=:353
SET str[10]=:2256
SET str[11]=:2257
SET str[12]=:2258
SET str[13]=:2259
SET str[14]=:2260
SET str[15]=:2261
SET str[16]=:2262
SET str[17]=:2263
SET str[18]=:2264

SET pStr=%~dp0
SET eStr=.kit
SET dStr=19
SET i=0

ECHO #################################
ECHO. 
ECHO Build Commands Shape Kit File Creator
ECHO.
ECHO #################################
IF (%1) == () GOTO ENDC

ECHO.
ECHO Shape files loaded.
ECHO.
SET /p fStr="Please enter a name for the new shape kit file: "

:TOPB
IF (%1) == () GOTO ENDB
SET /a i+=1
IF (%i%) == (%dStr%) GOTO ENDBB
ECHO %~nx1!str[%i%]!>>"%pStr%%fStr%%eStr%"
SHIFT
GOTO TOPB
:ENDBB
ECHO.
ECHO Max of 18 shapes are allowed, rest will be ignored.
:ENDB

ECHO.
ECHO %i% files succesfully saved to %fStr%%eStr%.
ECHO.
PAUSE
EXIT

:ENDC

ECHO.
ECHO ERROR - No shape files found.
ECHO.
ECHO You must drag and drop either .shp or .bo2 files on this to create a kit.
ECHO.
PAUSE
EXIT
