I am working on downloading a image from ftp ,where my ftp contains multiple images with different names generated every time in a folder.I just need to download a image whose name contains thumbs.jpg in it.
For ex i have 4 images with names
2342345232thumbs.jpg
453455345334snap.jpg,
4534532356pic.jpg,
1240897387trim.jpg
from which i want to download a image name which contains thumbs.jpg.
how can i achieve this .please suggest
Assuming you get the contents of the directory or atleast can retrieve the filenames, you could try string matching using
NSRange range = [imageName rangeOfString:@"thumbs.jpg"]; if (range.location != NSNotFound) // found matchand then download that particular image.HTH.