0

我可以使用 pscp.exe 将文件从 Unix 系统传输到我的 Windows 系统,如下所示:

(我在 VBScript 中这样做)。

Function vbsMsgBox ()
    set sh = CreateObject("WScript.Shell")
    sh.Run "C:\Users\msiddiq1\New\PSCP.EXE -pw password username@host:/b_st/batchrepo/BS31GZI C:\Users\msiddiq1\New"
End Function

但我想将从以下find命令返回的所有文件传输到我的 Windows 系统:

find /b_st/batchrepo/BS31GZI -name "*900000007*" # It returns 6 filenames.

如何将此命令合并到我上面的 pscp 命令?

我无法创建新目录。我是否必须使用循环。请建议。

谢谢。

4

1 回答 1

0

I just figured it out.

I tried this way:

Function vbsMsgBox ()
    set sh = CreateObject("WScript.Shell")
    sh.Run "C:\Users\msiddiq1\New\PSCP.EXE -pw password username@host:/b_st/batchrepo/BS31GZI/*900000007* C:\Users\msiddiq1\New"
End Function

It worked just fine.

Source : http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter5.html

thanks.

于 2015-05-08T09:54:34.073 回答