Topic "Script Automation with logging"

Author Message
Quinsy
[View user's profile]

Joined: 2015-11-09
Posts: 2
Hey.

Im trying to set the script to log what files getting copied over.

This is my command: "C:\Program Files (x86)\WinSCP\winscp.com" /log=>>logfile.log /script="xxxxxxx"

My question is how to i get the log file to add time and date for the copy between each seessions, right now they all endup underneath eachother with no timestamp.
I want to know when the copy was done.
Do i add /t or something, and where to i add it?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
I do not understand the question. Every entry in the log file has a timestamp.
Quinsy
[View user's profile]

Joined: 2015-11-09
Posts: 2
prikryl wrote:
I do not understand the question. Every entry in the log file has a timestamp.


I will post an example:

Searching for host...
Connecting to host...
Authenticating...
Using username "xxxxx".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] xxxxxxxxxx
/Outgoing
C:\xxxxxxxxxxx
test2.txt | 0 B | 0,0 KiB/s | binary | 0%
C:\xxxxxxxx
test2.txt | 0 B | 0,0 KiB/s | binary | 0%
Session 'xxxxxxxx' closed.
No session.
Searching for host...
Connecting to host...
Authenticating...
Using username "xxxx".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] xxxxxxx
/Outgoing
C:\xxxxxxxxx
test2.txt | 0 B | 0,0 KiB/s | binary | 0%
C:\xxxxxxxxxxxxxxxx
test2.txt | 0 B | 0,0 KiB/s | binary | 0%
Session 'xxxxxxx' closed.
No session.

Here i used the Script twice, but there is no time and or date between the different connections.

If you understand now?

And yes i do want it to just update the same logfile.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
This is not a log file. It's the console output.

Only now I've noticed that you use a wrong syntax of the command-line. The >> should not be there. Use:
"C:\Program Files (x86)\WinSCP\winscp.com" /log=logfile.log /script="xxxxxxx"
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