Topic "WINSCP.com - Script Overwrite Log-File"

Author Message
SoeR_IT
[View user's profile]

Joined: 2016-11-23
Posts: 2
Location: Germany
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
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
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.
SoeR_IT
[View user's profile]

Joined: 2016-11-23
Posts: 2
Location: Germany
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
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License