/log patterns

Advertisement

rmcree
Joined:
Posts:
7

/log patterns

Martin,

Would you post some examples of syntax utilizing &Y (year), &M (month), &D (day), &T (time), &H (hostname), &S (session name) patterns for log file naming conventions?
I'm using 3.81 and am use the /log parameter but can't get the patterns to work for me.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,661
Location:
Prague, Czechia

Re: /log patterns

WinSCP3.exe /log=d:\&s.log

_________________
Martin Prikryl

Reply with quote

rmcree
Joined:
Posts:
7

re:/log patterns

So I've been trying something like this:
WinSCP3.exe /log=d:\logname&d&m.log but it fails.
So I assume the name must be either all aribitrary text or all patterns, but not mixed?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,661
Location:
Prague, Czechia

Re: re:/log patterns

It works for me. What does it mean "it failes"? Any error message? Does it work at least with my simple example?
_________________
Martin Prikryl

Reply with quote

rmcree
Joined:
Posts:
7

examples

If I run:
WinSCP3.exe /script=c:\scripts\script.txt /log=c:\test.log
it works perfectly.
If I run:
WinSCP3.exe /script=c:\scripts\script.txt /log=d:\&d.log
or
WinSCP3.exe /script=c:\scripts\script.txt /log=d:\&d_test.log
it does not write the log file or offer an error message.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,661
Location:
Prague, Czechia

Re: examples

rmcree wrote:

it does not write the log file or offer an error message.
So it changes? Sometimes it does not write a log file and sometimes it shows an error? What is the error message? Please try to give more details.
_________________
Martin Prikryl

Reply with quote

rmcree
Joined:
Posts:
7

If I issue /log=d:\&d.log, no log is written and no error message is issued

If I issue /log=d:\test&d.log it writes a log file named test and no error message is issued.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,661
Location:
Prague, Czechia

How do you run WinSCP? I would suspect some interpreter to remove the &? patterns before running WinSCP.
_________________
Martin Prikryl

Reply with quote

rmcree
Joined:
Posts:
7

It's called from a batch file like this:
WinSCP3.exe /script=c:\scripts\FiletoIntermediary.txt /log=c:\scripts\File_retrieved.log

My hope is to append month and day to File_retrieved.log

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,661
Location:
Prague, Czechia

So it is Windows interpreter (cmd.exe). I was trying it directly. When I issue the command via interpreter, it treats & as command separator. You must see an error message saying "xxx is not recognised as as internal or external command ...", where xxx is part after the '&'. Do you? Its enough to enclose the /log value in quotes:
WinSCP3.exe /log="d:\&s.log"

_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum