Link to home
Start Free TrialLog in
Avatar of dspavlik
dspavlik

asked on

Directory Listing

Is there a way to create a html file that could be placed in a directory that would list the contents of that directory in the form of a link.  The contents would be other html/htm files used for archiving purposes.

Thanks
Avatar of William Fulks
William Fulks
Flag of United States of America image

On most web servers, just place the files in a directory WITHOUT an index.htm or html or a default.htm or html and it should display a list of the contents of the directory with links to each file.  Try it.
Avatar of dspavlik
dspavlik

ASKER

Sorry I should have mentioned that it is not going on a web server
You could maybe use the ActiveXObject("Scripting.FileSystemObject"); thing in JavaScript.  This will prompt you with whether you want to use the ActiveX component.

I am not sure exactly how it all works and what the code would be.  Unfortunately I don't have the time right now to look into it either.  But it may be a good starting point at least.
Is this going on any server at all? Or is it just going to be on your computer?

If it's not going on a server, just make a shortcut to that directory. If it's going on a computer on an internal network, share the folder, and it will show up for everyone under Network Neighborhood. They can then make shortcuts to it as necessary.

If it's on a server, you should be able to set it up as a network share, so everybody can access it.
No it will not be on a web server it will be on a file server and it will reside in a shared folder for all to access.  I was just wondering if there was a way to create an HTML doc that would list the files and folders where it resides.  Thanks
well, if this is case, why do u want the html page? when any user gets into the directory u share, he get all the files...isnt it?
Getting closer now.

var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.GetFolder("c:\\temp")
document.write("Folder name is: " + a.Name)

This will give you the name of the folder.  What you need now is the word to replace "Name" that will give your a directory listing.

You could then place the details in an Array and build a pretty version of the directory listing instead of what people will get if the folder is just shared.

To get a specific file you use:
var a = fso.GetFile("c:\\temp\\temp.log")

More research has shown me it gets somewhat complicated after this.  I could go further but then I would be doing the work for you and would probably be asking for lots of money as well. ;-)

Instead, I have found a site that should probably help quite considerably.  Once you understand Microsoft speak.

http://msdn.microsoft.com/scripting/default.htm?/scripting/jscript/doc/sgfsosample.htm
dij8,

Please re-submit as an answer.  If the questioner, does not return to grade, then I will do it for them.

TIA for helping to clean up the old questions.

teacher_mod
Community Support Moderator
Experts-Exchange
teacher_mod@experts-exchange.com
ASKER CERTIFIED SOLUTION
Avatar of dij8
dij8
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
dspavlik, you abandoned the questions:

https://www.experts-exchange.com/jsp/qShow.jsp?ta=msaccess&qid=20107774
https://www.experts-exchange.com/jsp/qShow.jsp?ta=msaccess&qid=20094809
https://www.experts-exchange.com/jsp/qShow.jsp?ta=msaccess&qid=20094260
https://www.experts-exchange.com/jsp/qShow.jsp?ta=javascript&qid=20134879
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20149309
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20147999
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20127161
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20123591
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20112558
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20101686
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20094157
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20038446
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20029752
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20008417
https://www.experts-exchange.com/jsp/qShow.jsp?ta=html&qid=20034882
https://www.experts-exchange.com/jsp/qShow.jsp?ta=networkgen&qid=20078536
https://www.experts-exchange.com/jsp/qShow.jsp?ta=networkgen&qid=20078533
https://www.experts-exchange.com/jsp/qShow.jsp?ta=networkgen&qid=20063493
https://www.experts-exchange.com/jsp/qShow.jsp?ta=networkgen&qid=20054270
https://www.experts-exchange.com/jsp/qShow.jsp?ta=networkgen&qid=11337557
https://www.experts-exchange.com/jsp/qShow.jsp?ta=netware&qid=20075338
https://www.experts-exchange.com/jsp/qShow.jsp?ta=netware&qid=20051986
https://www.experts-exchange.com/jsp/qShow.jsp?ta=netware&qid=11519078
https://www.experts-exchange.com/jsp/qShow.jsp?ta=lotusnotes&qid=11655379

please clear them up.

cjswimmer
cjswimmer,

Great list.  I am escalating this to staff level.  Perhaps an email from Ian may help to get those cleaned up, and if not Ian has the tools to take stronger action including suspension of the account.

Thanks for helping in the site cleanup.

teacher_mod
Community Support Moderator
Experts-Exchange
teacher_mod@experts-exchange.com
glad to be of assistance
Did I start something? ;-)
No, but I did.  Maybe it is time to do like has been done for other types of problems and remove the question points so they cannot ask any more questions until they reform their ways.

teacher_mod
Community Support Moderator
Experts-Exchange
teacher_mod@experts-exchange.com

Accepting requested answer.

teacher_mod
Community Support Moderator
Experts-Exchange
teacher_mod@experts-exchange.com
Accepted and moved to our PAQ by
Moondancer
Community Support Moderator @ Experts Exchange