Topic "/log patterns"

Author Message
rmcree
[View user's profile]

Joined: 2006-05-19
Posts: 7
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.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
Code:
WinSCP3.exe /log=d:\&s.log

_________________
Martin Prikryl
rmcree
[View user's profile]

Joined: 2006-05-19
Posts: 7
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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
It works for me. What does it mean "it failes"? Any error message? Does it work at least with my simple example?
_________________
Martin Prikryl
rmcree
[View user's profile]

Joined: 2006-05-19
Posts: 7
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
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
rmcree
[View user's profile]

Joined: 2006-05-19
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
How do you run WinSCP? I would suspect some interpreter to remove the &? patterns before running WinSCP.
_________________
Martin Prikryl
rmcree
[View user's profile]

Joined: 2006-05-19
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
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:
Code:
WinSCP3.exe /log="d:\&s.log"

_________________
Martin Prikryl
rmcree
[View user's profile]

Joined: 2006-05-19
Posts: 7
I wondered...I'll bet you nailed it there. Testing now.
rmcree
[View user's profile]

Joined: 2006-05-19
Posts: 7
You got it, that was it. Thanks, Martin.
Advertisements

You can post new topics in this forum






Search Site

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