In case that script is of any use to somebody else, here is it: (just put it in a text file and rename it with a .bat extension)
Code: Select all
@echo off
del data.lua
echo --This file has been automatically generated using Xaetral's batch script>>data.lua
for /r %~dp0prototypes %%f in (*.lua) do call :func %%f
goto end
:func
set z=%1
call set z=%%z:%~dp0=%%
set z=%z:\=.%
echo require("%z:.lua=%")>>data.lua
goto :eof
:end
echo --This file has been automatically generated using Xaetral's batch script>>data.lua