Batch command with Log exclusion lost transfer errorlevel
I finally got this transfer code working which limits the data going into the logfile but it has the unfortunate side effect of
Is there anyway to retain the WinSCP transfer errorlevel result and keep the
COMMAND IN BATCH FILE
DATA SENT TO LOGFILE
FindStr
replacing the errorlevel so I lose the ability to detect a failed upload or other issue.
Is there anyway to retain the WinSCP transfer errorlevel result and keep the
findstr
pipe? I wasn't able to find a way to suppress findstr
from modifying the errorlevel.
COMMAND IN BATCH FILE
"C:\Applications\WinSCP\winscp.com" /command "option batch on" "option confirm off" " open SomeFTPSite -hostkey="*"" "lcd E:\WorkingFolder\Temp\" "put ""ABMC_*.txt"" ""/ftpfolder/fakefolder/""" "exit"| findstr /v "batch confirm failonnomatch In open Searching Connecting Authenticat Using Starting Session""
DATA SENT TO LOGFILE
Active session: [1] SomeFTPSite E:\WorkingFolder\Temp Using configured transfer settings different from factory defaults. ABMC_xl201091ma | 0 B | 0.0 KB/s | binary | 0% Cannot create remote file '/ftpfolder/fakefolder/ABMC_xl201091ma.txt'. No such file or directory. Error code: 2 Error message from server: No such file (A)bort, (R)etry, (S)kip, Ski(p) all: Abort