How to copy multiple files using PSCP from Unix to Windows?

12.9k views Asked by At

With PSCP.EXE I am trying to copy multiple files from Unix server to my Windows local.

I am running the below code:

pscp.exe -pw password abc@host:"/batch/a1.btc /batch/a2.TMP /batch/a2.TMP" "C:\Users\Me"

But it takes the source to be one file instead of 3 files, thus cannot copy them.

How can I copy multiple files with PSCP?

3

There are 3 answers

0
AudioBubble On BEST ANSWER

It was a while ago you wrote this, but I had the same problem. If the files have same endings, same filetype you could use

pscp -pw password abc@host:/batch/*.TMP C:\Users\Me

Then it will copy all files with the ending .TMP!

1
Ram On

Run them in batch mode like this through a script:

pscp.exe -batch -pw password abc@host:/batch/a1.btc C:\Users\Me
pscp.exe -batch -pw password abc@host:/batch/a*.TMP C:\Users\Me
0
bugfighter On

The below command can be used to transfer multiple files using PSCP:

pscp.exe -unsafe -scp -pw password "abc@host:/batch/a1.btc /batch/a2.TMP /batch/a2.TMP" "C:\Users\Me"