I am write aws s3 data backup inside batch file as bellow
test.bat
@echo off
echo ---------Data synchronization START at %date% %time%------------
:loop
aws s3 sync D:\backup s3://upload --exclude "*.jpg"
IF %ERRORLEVEL% NEQ 0 GOTO :loop
echo ---------Data synchronization END at %date% %time%------------
this batch file run using run.bat file that look like bellow
run.bat
@echo off
start test.bat
timeout /t 10
taskkill /fi "imagename eq aws.exe" /f
taskkill /fi test.bat /f
I want to stop aws sync and close test.bat window after 10s run test.bat file
i try to stop aws sync process using taskkill /fi "imagename eq aws.exe" /f
and close test.bat window using taskkill /fi test.bat /f
but i can't stop aws sync process and close test.bat window
IF %ERRORLEVEL% NEQ 0 GOTO :loopis not supposed to end the loop after the sync is finished? have you tried to kill first test.bat ? - Paul