Is there any wildcards to copy a list of files from local to remote using PUTTY PSCP

0

1

Suppose I have a list of files(say - abc.pdf,xyz.pdf,pqr.pdf,uvw.pdf) on my local machine and I need to move all of these files to remote server using a single call to pscp.exe. I am calling this command line application(PSCP.exe) from my web application(ColdFusion). My web application will pass a list of files and I need to move these list of files to remote server using a single call to pscp.exe instead of calling it inside a loop of files. Is this possible to achieve using pscp.

**pscp C:\MyPath\*list of files* username@server:/ (pseudo code)**

The error saying "scp : No such file or directory"

It will work fine if I use the "*" wildcard as below and it copy all the files to the remote server. But the wild card for copying some particular files seems to be not working.

pscp C:\MyPath\* username@server:/

user815799

Posted 2017-11-15T14:37:56.903

Reputation: 1

1Why are you using *[abc.pdf]*? What filenames are you hoping to match, and to exclude?     Please do not respond in comments; [edit] your question to make it clearer and more complete. – G-Man Says 'Reinstate Monica' – 2017-11-15T14:54:28.127

Answers

0

pscp is Windows application and as such uses Windows wildcards.

There's no set pattern ([...]) in Windows wildcards, only * and ?.

Your question title is not correct. It's not true that you cannot use wildcards, what is also confirmed by you being able to use *. You just cannot use the set pattern.

Though your pattern [abc.pdf] is pretty suspicious. So it's also possible that you are trying to do something completely different.

Martin Prikryl

Posted 2017-11-15T14:37:56.903

Reputation: 13 764