android - Retrieve filename from a web folder -
i using asynctask
download file web folder. however, name of file different every time.
is there way name of file in web folder? (there 1 file in folder @ given time).
http://www.example.com/myfolder/myfile_1
try apacheurllister (i didn't tested may work):
url url; list serverdir = null; try { url = new url("http://www.abc.com/myfolder/"); apacheurllister lister = new apacheurllister(); serverdir = lister.listall(url); } catch (exception e) { e.printstacktrace(); log.e("error on getting file","error " +e); } system.out.println(serverdir); return serverdir;
Comments
Post a Comment