Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading filenames from a folder - for intranet site

Status
Not open for further replies.

SadOldGoth

Programmer
May 21, 2002
42
GB
Hi Folks,

I'm trying to set up a page of links to documents in the local folder. Does anyone have a script that can read through the filenames in a folder and create links to each of them?

Ideally what will happen is that the page will open read the filenames, create links to the filenames and display the links on the page.

Can this be done through javascript or do I need to look elsewhere?

Thanks,

Jes
 
I don't think you could get a list of all files in a directory using javascript.

If you were using a server on each person's computer then you could work out a way, but that's more complicated than you probably want. So in essence, yes, you will need to look elsewhere.
 
I dont think this is really what you are looking for but the following will kinda do this.

<form action=&quot;file:///c:\path/&quot;>
<input type=&quot;submit&quot; value=&quot;button name&quot;>
 
Hi Both,

Yeah, I kinda figured this was the response I was going to get. Oh well, better learn ASP.

Thanks very much for your responses though,

Jes
 
Yes this can be done in ASP, there is a FileSystem object, File object, and even Drive object. Basically you can create the filesystem object with a path, then loop through all the Files int the filesystem doing anything you want with them (like display the names). If you do a search on the ASP forum there was an example posted at somepoint in the last week and half if I remember correctly.
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top