[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 136
  • Last Modified:

IIS / .asp query (file lists)

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
ptruman
Asked:
ptruman
1 Solution
 
rajgnCommented:
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
 
ptrumanAuthor Commented:
Useful, although I found this about 10 mins after I posted the question :)

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now