Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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.
leonardo07746

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

u definitely right, i fixed, now, still overrides, no append
martin

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.
leonardo07746

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