Listing directory from database in order and showing sub folders and files. Classic ASP?

Up vote 0 down vote favorite share g+ share fb share tw.

I know there are solutions out there for showing a windows directory of folders and files but mine is from a virtual directory within a database. I have it so far that when you click a show me button it shows the directory path you are in e.g. Folder 1.1.1 folder 1.1 folder 1 it displays in this order but I want it to display the main directory at the top. I would also like to be able to make the list of files clickable so that you can go straight to a specific file or folder when you click the show me button to make it easier for users to find the file they want.

Is it possible to display sub-directories without been inside them? My code for displaying the directory path you are in is: dim previousPos previousPos = 0 dim html html = "" if not test. BOF then do while not objRsU.

EOF 'if previousPos = (test. Fields(2)) then response. Write html & "" html = "" 'else html = test.

Fields(0) & "\" & html 'end if previousPos = test. Fields(2) test. MoveNext loop end if set test =nothing set try =nothing ListFolderContents Server.

MapPath("/"), 0 sub ListFolderContents(path, level) dim fs, folder, file, item, subFolders set fs = CreateObject("Scripting. FileSystemObject") set folder = fs. GetFolder(path) if folder.SubFolders.

Count > 0 or folder.Files. Count > 0 then 'Display the target folder and info. If level > 3 then Response.

Write(""& folder.Name &"" & html) end if 'Display a list of sub folders. For each item in folder. SubFolders ListFolderContents item.

Path, level + 1 next 'Display a list of files. Response. Write("" & html) for each item in folder.

Files Response. Write("" & try.Name & "") next Response. Write("" & html) end if end sub This second part of the code displays the Main folder of the directory.

Any help would be very much appreciated. Thanks asp-classic link|improve this question edited Aug 23 '11 at 13:13stealthyninja5,2304814 asked Aug 22 '11 at 18:55CH1111.

It supports Classic ASP. ckfinder.com.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions