The core of this application is
the FileSystemObject (FSO) object. The FSO contains all the tools needed for
browsing directories, accessing files, editing files etc. This article isn't
an introduction to the FSO.
The folder view
The folder's pane has to do
several things -
List folder names with links to
Have the ability to view files
in those folders (through the files frame).
Be able to create new folders.
Be able to modify folders.
Show general information about
Show the 'Up one level...' if it
is not a root folder.
Show all other drives on the
If Len(Request.QueryString("drive")) Then
set objDrive = objFSO.GetDrive(Request.QueryString("drive"))
set objDrive = objFSO.GetDrive("d:")
If Len(Request.QueryString("folder")) Then
set objcolFolders = objFSO.GetFolder(Request.QueryString("folder"))
set colFolder = objColFolders.SubFolders
Set objcolFolders = objFSO.GetFolder(objDrive.Driveletter & ":\domains")
set colFolder = objcolFolders.subfolders
This code attained the drive and folder that
you wanted to access, this meant that you could just change two properties (1
if you inputted the whole path) to show the entire listing. It also specified
If Not objcolFolders.Path = objDrive.Driveletter & ":\domains" Then
Set objParent = objcolFolders.ParentFolder
Response.Write("<a href=folders.asp?folder=" & objParent.Path & "
target=folders>..Up one level</a>")
For each folda in colFolder
These two block incorporate the ...Up one level
and the entire listing (I edited that because it was too long).
For intCode = 65 To 90
letter = Chr(intCode)
If objFSO.DriveExists(letter) Then
Response.Write("<option value=" & letter & ">" & letter & "</option>")
This looped through all of the drive letters
possible (A (65) - Z (90)) and checked for their existence before
showing the option to display them.
The 'View' link, was set to link to
The New Folder and 'More...' links were set to
a file called morefolders.asp. On that page are a list of actions that the
user can perform.