You must keep in mind: if your web-server disallows to scan a directory then you couldn’t get file names. But if the directory is shared in web-server you can get a list of files with using wget
command. For example:
wget -nv -r -np '*.*' https://example.com/directory/
2
solved Download files from url of site directory