Send a log to a file after a script runs

Advertisement

Joshuas
Guest

Send a log to a file after a script runs

Hi,

I have successfully written a script to sync all my SFTP with a cloud storage I have set up. New files are added every day and I have the script being called a few times a day. Question: How can I output the results of the log to a text file or send an email to myself with what the results were or what new files were synched.. Is there a way of doing this?> Help is appreciated mucho mucho

Reply with quote

Advertisement

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

Re: Send a log to a file after a script runs

WinSCP session log includes a timestamp.
Possibly you mean something else by a "log" (WinSCP console output redirected to a file?).

Last edited by martin on 2014-04-14; edited 1 time in total

Reply with quote

Joshuas
Guest

No, I as able to add to the winscp script text file by adding !D!M!Y... How can I set it to only tell me what files it added or extract that information from the log?

Reply with quote

Guest

Also, there seems to be an error everytime I have a batch file called automatically to run the Winscp script. It works great manually, only when using task scheduler do I get issues. Error code 3.

Reply with quote

Joshuas
Guest

using winscp.com does not solve the problem. Its crazy I can manually run the script no problem but when Task Scheduler tries the world blows up.

Reply with quote

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

Anonymous wrote:

Also, there seems to be an error everytime I have a batch file called automatically to run the Winscp script. It works great manually, only when using task scheduler do I get issues. Error code 3.
It might be this problem:
https://winscp.net/tracker/show_bug.cgi?id=996
Make sure you are using the latest version of WinSCP (and restart your server after upgrade).
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum