I have some links such as:
How I can I download all files and directories with
Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
HTTP doesn't really expose a filesystem, so
Translation: If you want to get all that stuff, have it linked from somewhere in the page/site. Or, use FTP, which is far better suited for the job.
If you have a list of urls in a file named links.txt:
If what you have is a html file with lots of href and other tags..., you could us regexp to parse them and finally get a clean list.