Solved

IIS / .asp query (file lists)

Posted on 1998-11-19
2
130 Views
Last Modified: 2013-12-25
Ok, withOUT resorting to CGI's, I wish to do the following :
I have a directory on my server which I do NOT allow
people to get directory listings of (currently).
What I want on my index.html is a small .asp which will :

Pull a list of the files (NOT dir's) in the directory
Produce a list of the files (with links to those files)

Is this possible with .asps?
If so, can someone post a URL to get me started?
0
Comment
Question by:ptruman
2 Comments
 
LVL 1

Accepted Solution

by:
rajgn earned 50 total points
ID: 1829656
Existing filesystem object on IIS doesn't have capability to read the directories. Hence download and install 'Windows Scripting Host from Microsoft' will expand the properties and methods of the filesystem object to include CopyFile, CopyFolder, CreateTextFile, DeleteFile, DeleteFolder, DriveExists, FileExists, FolderExists, GetDrive, GetDriveName,
GetFile, GetFolder, GetTempName, MoveFile, MoveFolder and more.

Once you install it, then create an instance of filesystem object and call appropriate methods to get the directory listing.

the above said component can be downloaded at :

http://msdn.microsoft.com/scripting/default.htm?/scripting/windowshost/

Some other third party free components are also available for file management. You can find some at:

http://www.activeserverpages.com/components/freefile.asp
0
 
LVL 1

Author Comment

by:ptruman
ID: 1829657
Useful, although I found this about 10 mins after I posted the question :)

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question