Script Automation with logging

Advertisement

Quinsy
Joined:
Posts:
2

Script Automation with logging

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?

Reply with quote

Advertisement

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

Re: Script Automation with logging

I do not understand the question. Every entry in the log file has a timestamp.

Reply with quote

Quinsy
Joined:
Posts:
2

Re: Script Automation with logging

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

Reply with quote

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

Re: Script Automation with logging

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"

Reply with quote

Advertisement

You can post new topics in this forum