It works well for me — even better than the arduino-esp8266fs-plugin.
Code: Select all
@echo off
setlocal enabledelayedexpansion
REM Проверка на броя аргументи
if "%~1"=="" (
echo This tool will send either one, or all data files to the web interface
echo.
echo Syntax: %~nx0 ^<hostname or IP address^> [^<path to a file^>]
exit /b 255
)
if not "%~3"=="" (
echo This tool will send either one, or all data files to the web interface
echo.
echo Syntax: %~nx0 ^<hostname or IP address^> [^<path to a file^>]
exit /b 255
)
set IP=%~1
echo Uploading to %IP%
REM Ако има втори аргумент – ползваме него, иначе ./data/*
if not "%~2"=="" (
set FILES=%~2
) else (
set FILES=.\data\*
)
for %%F in (%FILES%) do (
echo Sending: %%F
curl -F "data=@%%F;filename=%%~nxF" http://%IP%/edit
)
endlocal
Then open the Windows Command Prompt and execute it like this: path to the bat file/upload.bat 192.168.4.1
@Johannes feel free to add it to the repo.