WINSCP.com - Script Overwrite Log-File
Hello,
i have a little Problem, we put a File with WINSCP.com to a FTP-Server 3 times a day, this creates with the time a very large log file. Here is my script that also works:
@echo off
C:\"Program Files (x86)"\WinSCP\winscp.com /log=C:\FilePath\ftp.log /command ^
"open ftp://Username:Pass@Example.de" ^
"put C:\FilePath\File.html /pages/site/Folder001/Folder002/" ^
"exit"
echo Finished
If I now the logginglevel = 1 set
C:\"Program Files (x86)"\WinSCP\winscp.com /log=C:\FilePath\ftp.log /loglevel=1 /command ^
comes the following message:
2016-11-23 10:42:36.116 Session upkeep
> 2016-11-23 10:42:36.116 Script: exit
. 2016-11-23 10:42:36.116 Session upkeep
. 2016-11-23 10:42:36.116 Script: Exit code: 0
. 2016-11-23 10:42:36.116 Script: Max roundtrip: 0
. 2016-11-23 10:42:36.116 Got reply 1004 to the command 4
And nothing is written to the LOG file
Just do not work, I set as in a Post in this Forum the LOG command after the exit no LOG file is created:
@echo off
C:\"Program Files (x86)"\WinSCP\winscp.com /command ^
"open ftp://Username:Pass@Example.de" ^
"put C:\FilePath\File.html /pages/site/Folder001/Folder002/" ^
"exit"
/log=C:\FilePath\ftp.log /loglevel=1
echo Finished
I can also not work with the GUI since we run this time-controlled by task scheduling, since before a database this HTML page is compiled.
Many thanks for the support.
SOER_IT
i have a little Problem, we put a File with WINSCP.com to a FTP-Server 3 times a day, this creates with the time a very large log file. Here is my script that also works:
@echo off
C:\"Program Files (x86)"\WinSCP\winscp.com /log=C:\FilePath\ftp.log /command ^
"open ftp://Username:Pass@Example.de" ^
"put C:\FilePath\File.html /pages/site/Folder001/Folder002/" ^
"exit"
echo Finished
If I now the logginglevel = 1 set
C:\"Program Files (x86)"\WinSCP\winscp.com /log=C:\FilePath\ftp.log /loglevel=1 /command ^
comes the following message:
2016-11-23 10:42:36.116 Session upkeep
> 2016-11-23 10:42:36.116 Script: exit
. 2016-11-23 10:42:36.116 Session upkeep
. 2016-11-23 10:42:36.116 Script: Exit code: 0
. 2016-11-23 10:42:36.116 Script: Max roundtrip: 0
. 2016-11-23 10:42:36.116 Got reply 1004 to the command 4
And nothing is written to the LOG file
Just do not work, I set as in a Post in this Forum the LOG command after the exit no LOG file is created:
@echo off
C:\"Program Files (x86)"\WinSCP\winscp.com /command ^
"open ftp://Username:Pass@Example.de" ^
"put C:\FilePath\File.html /pages/site/Folder001/Folder002/" ^
"exit"
/log=C:\FilePath\ftp.log /loglevel=1
echo Finished
I can also not work with the GUI since we run this time-controlled by task scheduling, since before a database this HTML page is compiled.
Many thanks for the support.
SOER_IT