login about faq

Hi Everyone,

Is there any kind of wildcard when downloading using sftp. Something like that:

BOOL success = [sftp DownloadFileByName:@"/home/user/*.txt" localFilePath:@"/mydir"];


asked Jul 26 '12 at 20:47

RinaldoSJr's gravatar image


I'm sorry to say that using a wildcard like you've described will not work.

To download all files matching a pattern such as "*.txt", you would write code that iterates over the files in a directory, such as shown here: http://www.example-code.com/objc/sftp_readDir.asp

and then within the loop, call DownloadFileByName for each filename that matches your pattern.


answered Jul 27 '12 at 16:29

chilkat's gravatar image

chilkat ♦♦

Thanks for your answer.

(Jul 30 '12 at 07:02) RinaldoSJr
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jul 26 '12 at 20:47

Seen: 2,889 times

Last updated: Aug 23 '12 at 04:59

powered by OSQA