Help with Outputlog for mixed scripting
I need help figuring out how to add in an output log for a mixed script.
This is a "Simple" automation to basically pass files from a 3rd party SFTP to a 3rd party software on my clients server. There are several other things going on in the collection of scheduled scripts but what I need help with is getting WinSCP to print the output of the .ini to a log file.
Here is what's inside the .ini:
open User:Pass@Server.location.com
option confirm off
get RootDir:/folder/file D:\OurFolder\SubFolder\
get RootDir:/folder/file2 D:\OurFolder\SubFolder\
exit
The .ini is run from a batch file, here's the line that runs the .ini:
D:\OurFolder\winscp\winscp.exe /script=D:\OurFolder\Get-Files.ini
There are actually 2 other .ini files, but this is the important one. That's all WinSCP does in this series of scripts. I would like to know if there is a way that I can make it so that it prints everything out to a log?
When I run the commands manually I get:
winscp> open User:Pass@Server.location.com
Searching for host...
Connecting to host...
Authenticating...
Using username "User".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] User:Pass@Server.location.com
winscp> get RootDir:/folder/file D:\OurFolder\SubFolder\
file | 0 B | 0.0 KiB/s | binary | 0%
winscp> get RootDir:/folder/file2 D:\OurFolder\SubFolder\
file2 | 0 B | 0.0 KiB/s | binary | 0%
winscp> exit
If i can get it to dump that same information in a log file, I'll be golden.
This is a "Simple" automation to basically pass files from a 3rd party SFTP to a 3rd party software on my clients server. There are several other things going on in the collection of scheduled scripts but what I need help with is getting WinSCP to print the output of the .ini to a log file.
Here is what's inside the .ini:
open User:Pass@Server.location.com
option confirm off
get RootDir:/folder/file D:\OurFolder\SubFolder\
get RootDir:/folder/file2 D:\OurFolder\SubFolder\
exit
The .ini is run from a batch file, here's the line that runs the .ini:
D:\OurFolder\winscp\winscp.exe /script=D:\OurFolder\Get-Files.ini
There are actually 2 other .ini files, but this is the important one. That's all WinSCP does in this series of scripts. I would like to know if there is a way that I can make it so that it prints everything out to a log?
When I run the commands manually I get:
winscp> open User:Pass@Server.location.com
Searching for host...
Connecting to host...
Authenticating...
Using username "User".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] User:Pass@Server.location.com
winscp> get RootDir:/folder/file D:\OurFolder\SubFolder\
file | 0 B | 0.0 KiB/s | binary | 0%
winscp> get RootDir:/folder/file2 D:\OurFolder\SubFolder\
file2 | 0 B | 0.0 KiB/s | binary | 0%
winscp> exit
If i can get it to dump that same information in a log file, I'll be golden.