I have been trying for a couple of weeks to download a file from my web-server, I am finding it slightly complex as the requirements needed aren't straight forward;
First off my mobile app will check with the server for a new / updated manifest file. If available, the file is then downloaded and stored in a SQLlite database for further processing.
Is there a way to search for a new filename using a wildcard search of some description?
The file name would have a static name except date and time. eg: deviceupdate.phoneid.20151001.1330 So searching for the latest file then downloading.
Secondly.... Once the file has been downloaded is there anyway of instructing a delete command. Would need to clear up the server dir so makes sense to delete upon download.
I am currently uploading files on frequent intervals to the server via a CGI script, however I have been unable to create a working CGI script to handle the downloads, then also send the data back to the mobile application.
Hopefully this makes sense, any help would be GREATLY appreciated!

Many Thanks
Gary