I have (II think) a quite simple task to perform but I'm stuck.
- I want to transfer via batch and task a textfile with time-bookings to a server, where they are processed by a task and then the file will be removed from the server. Therefore my upload batch should not overwrite the file on the server until the file is processed and removed from the server.
- (not startet because of 1.) When successful transferred, the file should be locally moved to an oder folder and renamed.
option batch on,
option batch abort, in Preferences "No confirmations for background transfers" is not activated. Please help! Thx
@echo off "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\Zeiterfassungfiles\FTP_Log\WinSCP_Test.log" /ini=nul ^ /command ^ "option batch abort" ^ "open sftp://xxx" ^ "lcd C:\Zeiterfassungfiles" ^ "cd /sftp/ZEIT" ^ "put Test.txt" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%