I'm trying to display my folders and subfolders of a parent folder in format exactly like :
[Parent Folder 1
[SubFolder1,
[Folder2],
[Folder3],
[Folder4]
],
[SubFolder2,
[Folder2],
[Folder3],
[Folder4]
],
]
but it didn't work. The part which i'm unable to figure is when to put the the ']' after each subfolder.... could anybody help...?
'codes below '
***********************************************************
<%
makefolder("C:\Program Files\")
Sub makefolder(path)
dim fs,fo,x,i
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder(path)
for each x in fo.SubFolders
'Print the name of all subfolders in the test folder
if x.SubFolders.Count > 0 Then
Response.write(" , <br>")
makefolder(x.Path)
else
Response.write(" ] , <br>")
End if
Response.write("<BR>")
Response.write(" ] ,<br>")
next
set fo=nothing
set fs=nothing
End Sub
%>
p/s : Thank you...
[Parent Folder 1
[SubFolder1,
[Folder2],
[Folder3],
[Folder4]
],
[SubFolder2,
[Folder2],
[Folder3],
[Folder4]
],
]
but it didn't work. The part which i'm unable to figure is when to put the the ']' after each subfolder.... could anybody help...?
'codes below '
***********************************************************
<%
makefolder("C:\Program Files\")
Sub makefolder(path)
dim fs,fo,x,i
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder(path)
for each x in fo.SubFolders
'Print the name of all subfolders in the test folder
if x.SubFolders.Count > 0 Then
Response.write(" , <br>")
makefolder(x.Path)
else
Response.write(" ] , <br>")
End if
Response.write("<BR>")
Response.write(" ] ,<br>")
next
set fo=nothing
set fs=nothing
End Sub
%>
p/s : Thank you...