Windows batch scripting is the worse thing. To avoid it you could install Cygwin so you can use a bash script, but that may not be worthwhile just for this one thing. Here's how to collect all the .spine files in the current directory into a variable:
@echo off
Setlocal EnableDelayedExpansion
for %%F in ("*.spine") do (
set args=!args!
---
project %%~nxF
)
echo %args%
You can replace "*.spine"
with a path like "C:\path\to\dir\*.spine"
.
That just echos (prints) the args
variable. You can use the variable when running Spine like this:
spine -i input.spine %args% -o /path/to/output/ -p /path/to/pack.json
You could also use this to export many project files with one Spine invocation, which will be faster than running Spine many times. Please let us know if you need any more assistance getting it working!