Re: Batch command with Log exclusion lost transfer errorlevel
This is the first time on a coding site I have gotten a positive response, this is a wonderful community. Below is what I ended up with, my global downtime module is working and the logs still look great. This is part of a 2,250 automation script template that I created and this is the last item in the latest upgrade that was holding me back. Thank You Martin!
:MODULE_13_2_UPLOADFTP
ECHO.& ECHO ░░░░░░░░░░░░░░░░░░░░░░ FTP UPLOAD %UploadCount% ░░░░░░░░░░░░░░ATTEMPT %AttemptsUpload%
ECHO Copying %Filename% to {S}FTP %UploadConnection% at %UploadPath%
REM ECHO %FTPCOMMAND2% "open %UploadConnection% -hostkey="*"" "lcd %TempPath%" "put ""%Filename%"" ""%UploadPath%""" "exit"
%FTPCOMMAND2% "open %UploadConnection% -hostkey="*"" "lcd %TempPath%" "put ""%Filename%"" ""%UploadPath%""" "exit" > %DowntimeTemp%
IF ERRORLEVEL 1 (SET "FTPERROR=1") ELSE (SET "FTPERROR=0")
TYPE %DowntimeTemp%%FTPEXCLUSION%
DEL "%DowntimeTemp%"
ECHO Error level %FTPERROR%
IF "%FTPERROR%" NEQ "0" GOTO :MODULE_13_5_UPLOADERROR
ECHO FILE{S} UPLOADED SUCCESSFULLY
ECHO %TODO2% {%UploadCount%} Up FTP - [%UploadConnection%]
GOTO :MODULE_13_4_UPLOADSUCCESS
ECHO THIS SHOULDNT HAPPEN SOMETHING IS SETUP WRONG IN MODULE_13_2_UPLOADFTP& GOTO :MODULE_18_1_EXIT