使用pscp.exe,如何查找文件然后从Unix传输到我的Windows系统?

时间:2022-04-05 15:03:38

I can transfer files from Unix system to my windows system using pscp.exe as below:

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

(I am doing this in VBScript).

(我在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

But I want to transfer all the files returned from the below find command to my windows system:

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

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

How can i merge this command to my above pscp command?.

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

I cannot create a new directory. Will i have to use a loop. Please suggest.

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

thanks.

1 个解决方案

#1


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

资料来源:http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter5.html

thanks.

#1


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

资料来源:http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter5.html

thanks.