I have a run.sh
which takes 2 parameters, one MP4 file and many CSV files, works perfectly on Linux.
#!/bin/sh
chmod +x my_py_script.py
./my_py_script.py ./mp4/my_video.mp4 ./csv/*.csv
But when I convert it to work on Windows with this batch script:
@echo off
setlocal enableDelayedExpansion
set MYDIR=D:\my_folder_path\csv
for /f %%i in ('dir /B/D %MYDIR%') DO call :concat %%i
python "D:\my_folder_path\my_python_script.py" "D:\my_folder_path\mp4\my_mp4_file.mp4" %myvar%
goto :eof
:concat
set myvar=%myvar% %MYDIR%\%1
goto :eof
It throws an error that parameter is too long. I have about 30,000 CSV files in CSV folder.
How can I fix it?