0 votes
by (240 points)

Hi Support,
I am trying to download file with specific string in its name from sftp using below code but it doesn't download nor throw any error.

in my example, I need to download the file having "MapleBrownPrice" .

string SearchPattern = "MapleBrownPrice??.CSV";
sftp.Download(sourcepath + SearchPattern, @destinationPath );

Please suggest.

Thanks
Vinay

Applies to: Rebex SFTP
by (240 points)
its working now, I had to change the search pattern to "MapleBrownPrice*.CSV"

Thanks

1 Answer

+1 vote
by (144k points)

Hi, the "MapleBrownPrice??.CSV" will only match files with exactly two characters between "MapleBrownPrice" and ".CSV". On the other hand, "MapleBrownPrice*.CSV" will match files with any numbers of characters there.

For more information, see Using wildcards.

...