JS and Webserver interaction

I want to check with an JS file if a folder with files was created/uploaded in by webserver.
After that I want to search for the .html file in the folder and then set an link to that file in my html file where the JS file is located.
Is this possible with JS, when yes how?