【问题标题】:Putty PSFTP output to txt file腻子 PSFTP 输出到 txt 文件
【发布时间】:2014-07-18 10:12:49
【问题描述】:

我正在尝试确定将文件复制到服务器的批处理文件是否成功。我正在尝试将命令输出到“output.txt”文件,但该文件始终为空。

"C:\Program Files\Microsoft Application Virtualization Client\sfttray.exe" /launch "PSFTP 0.62.0.0" fxx@fosp.nat.xx.com -pw f0sftp -v -b C:\Users\mputFOS.txt  -bc >> C:\Users\output.txt

cd /home/fox
lcd \\office\Server%20Upload%20Files\
put Spf.csv

【问题讨论】:

    标签: batch-file command-line ftp sftp putty


    【解决方案1】:

    您需要重定向 stdout 和 stderr。

    刚刚对其进行了测试,所有 -v 的东西都进入了 stderr。

    pscp.exe -v ... > out.txt 将标准输出重定向到 out.txt pscp.exe -v ... 2> err.txt 将 stderr 重定向到 err.txt 作为提示

    pscp.exe -v ...> both.txt 2

    http://whrl.pl/Rckrc7

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-02
      • 1970-01-01
      • 2013-03-07
      • 1970-01-01
      • 2021-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多