1

I have a limited hosting server. I want to read the filetree (all files and folders) and create a hyperlink to them on a basic html page.

For clarity, I'm using Keybase, am publicly sharing files, but want to list them on an index.html page, not use their site's "filetree"

https://keybase.pub/example_user (keybase filetree) https://example_user.keybase.pub (the index.html file)

The html file is in the root directory and I want to display all the (pdf) files in /subdir (and their sub-directories)

This isn't a "real" webserver. I'm looking for something easy and simple like a FOR loop on load within html

Thanks.

2
  • For security reasons javascript is not able to access the local filesystem. You won't be able to do what your asking without involving the server on the back end. Commented Sep 23, 2020 at 14:23
  • couldn't I read all the files that are public on an external server? Commented Sep 23, 2020 at 15:01

1 Answer 1

0

What you are trying to do is known as "screen scraping". If you do some googling on the keywords "javascript screen scraping" you will find lots of information and examples.

Basically, You fire off an AJAX request to retrieve the content of a page, parse that content to obtain the data your looking for, and then display that data in your page.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. I should be able to figure something out with that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.