为WinSCP脚本启用文本文件记录 [英] Enabling text file logging for WinSCP script

查看:202
本文介绍了为WinSCP脚本启用文本文件记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,有一个WinSCP脚本可以使用SFTP将文件放置在远程服务器上,效果很好.但是我可以启用登录到本地目录中的文本文件的功能.

Hi have a WinSCP script to put a file on remote server using SFTP, which is working fine. But I would enable logging to a text file on a local directory.

我有以下脚本

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

很多人知道如何将上述脚本的结果记录到本地文件中吗?

Many I know how I can log results of above script to a local file?

推荐答案

要启用日志记录,请使用 /log=命令行开关:

To enable logging, use the /log= command-line switch of WinSCP:

winscp.com /script=C:\path\to\script.txt /log=C:\path\to\script.log

这篇关于为WinSCP脚本启用文本文件记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆