I need to get the name of all files inside a folder given by a url. Suppose the webserver has a directory http://www.example.com/images/ and the folder contains files 1.png, 2.png and 3.png. I need to get the names of these image files using the url to the directory.
Share
You can’t, but the webserver might allow directory listing and then it produces a text or html page listing the files in that directory. You can then parse that response.
Test if the webserver allows directory listing by accessing the url in a browser:
www.example.com/images/and see what response you get. Is it a file listing of some sort then you can parse that response.