my script doesn't append the log files anymore, instead it overrides them

Advertisement

leonardo07746
Joined:
Posts:
11
Location:
cuba

my script doesn't append the log files anymore, instead it overrides them

Need help with this, I have winscp 5.7.5 and my script doesn't append the logs anymore, in the Winscp settings at tools/reference/logging/ the enable session box is checked and in the Log to file box i entered:
"C:\LOGS JOURNALS\logsdelScript_!Y_!M_!D.log" Below the append option is checked

the script goes like this:
@echo off

winSCP.com /command ^
"option batch abort" ^
"open ftp://user:password@192.168.x.xx/" ^
"synchronize local C:\Sabcc\JOURNAL /Journals/TRuSVAL -filemask=*>"2016-09-20 "
"close" ^
"quit" ^
/log= "C:\LOGS_JOURNALS\logsfromScript_!Y_!M_!D_!T.log" /loglevel=1

"quit"


By reading the put and append command documentation the line of the logs should goes like this but still doesn't append them.

put -append /log= "C:\LOGS_JOURNALS\logsfromScript_!Y_!M_!D_!T.log" /loglevel=1


Thanks

Reply with quote E-mail

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
30,704
Location:
Prague, Czechia

Re: my script doesn't append the log files anymore, instead it overrides them

leonardo07746 wrote:

and in the Log to file box i entered:
"C:\LOGS JOURNALS\logsdelScript_!Y_!M_!D.log"
But you override that in your script with:
/log="C:\LOGS_JOURNALS\logsfromScript_!Y_!M_!D_!T.log"
The !T makes the file name different every second. So there's never a log file to append to with that name.

Reply with quote

leonardo07746
Joined:
Posts:
11
Location:
cuba

Re: my script doesn't append the log files anymore, instead it overrides them

martin wrote:

leonardo07746 wrote:

and in the Log to file box i entered:
"C:\LOGS JOURNALS\logsdelScript_!Y_!M_!D.log"
But you override that in your script with:
/log="C:\LOGS_JOURNALS\logsfromScript_!Y_!M_!D_!T.log"
The !T makes the file name different every second. So there's never a log file to append to with that name.


u definitely right, i fixed, now, still overrides, no append
_________________
leo

Reply with quote E-mail

martin
Site Admin
martin avatar
Joined:
Posts:
30,704
Location:
Prague, Czechia

Re: my script doesn't append the log files anymore, instead it overrides them

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

You can post new topics in this forum