Enabling text file logging for WinSCP script
您好,有一个WinSCP脚本可以使用SFTP将文件放置在远程服务器上,效果很好。 但是我将启用日志记录到本地目录上的文本文件。
我有以下脚本
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | option batch on option confirm off # connect minute session open sftp://xyz.com:22/ -privatekey=E:\\PK\\*.ppk # force binary mode transfer option transfer ascii # navigate to mediacom and put file lcd"E:\\export\" cd /mediacom/testdir put"CI_Tst.tab" # disconnect daily session close # exit WinScP exit |
许多我知道如何将上述脚本的结果记录到本地文件中?
要启用日志记录,请使用WinSCP的
1 | winscp.com /script=C:\\path\\to\\script.txt /log=C:\\path\\to\\script.log |
您可以使用
参见https://winscp.net/eng/docs/ui_pref_logging#session_log