WINSCP.com - Script Overwrite Log-File

Advertisement

SoeR_IT
Joined:
Posts:
2
Location:
Germany

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: WINSCP.com - Script Overwrite Log-File

Sorry, your question is not clear. So you added the /loglevel=1 switch after the /log=C:\FilePath\ftp.log, right?

Then, when you execute the batch file, what happens?
- Are the files uploaded?
- Is anything at all written to the log?

It's not clear that you mean by "comes the following message":
- Is that log snippet, all that is written to the log? (unlikely)
- Remnant of the previous run (without the /loglevel=1)?

What version of WinSCP are you using? Make sure you have the latest one.

Reply with quote

SoeR_IT
Joined:
Posts:
2
Location:
Germany

Loglevel=1

Hello,

it suddenly goes, I have provided(constructed) it as follows:

@echo off
C:\"Program Files (x86)"\WinSCP\winscp.com /log=C:\FilePath\ftp.log /loglevel=1 /command ^
"open ftp://Username:Pass@Example.de" ^
"put C:\FilePath\File.html /pages/site/Folder001/Folder002/" ^
"exit"
echo Finished

why it has not functioned(worked) on the 23.11.2016 is also not clear to me, but now it goes and the LoG file is headlined.
You can close the Post.

Thanks a lot.
Best wishes

Reply with quote

Advertisement

You can post new topics in this forum