Sitemap based off site folder structure

Hi

I would like to create a sitemap for a large static site.  Each page on the site has its own folder - e.g.

home
-->about_us
-->contact_us

so within the about_us and contact_us folders we have index.asp files.  The folders can have several levels of child folders.

Is it possible to generate a sitemap based off the folder structure or will it have to be a manual job?

Thanks
Jackass03Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pgkooijmanCommented:
You could look through the sub folders:

Set fsRoot = fsFileSystem.GetFolder(strDirectory)
Set RootFolders = fsRoot.SubFolders
For Each Folder IN RootFolders
    Response.Write "HTML for Sitemap"
Next

0
Jackass03Author Commented:
Hi

I have given that a go and it gives you the full path to all the top level folders.  Is there anyway to display the folder name and its sub folders in a list?

here is my code so far:

<%

set fsFileSystem = CreateObject("Scripting.FileSystemObject")

path ="D:\\www"

Set fsRoot = fsFileSystem.GetFolder(path)
Set RootFolders = fsRoot.SubFolders
For Each Folder IN RootFolders
    Response.Write Folder
Next
%>

Hope you can help
0
Jackass03Author Commented:
Folder.Name will return the foldername - just stuck on making into a list with the child folders
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

kevp75Commented:
what are you trying to do.....drill down through the folders?
0
kevp75Commented:
try this out

<%
Set FSO = CreateObject("Scripting.FileSystemObject")
ShowSubfolders FSO.GetFolder("d:\path to your folder")
Sub ShowSubFolders(Folder)
    For Each Subfolder in Folder.SubFolders
        response.write Subfolder.Path & "<br />"
        ShowSubFolders Subfolder
    Next
End Sub
%>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jackass03Author Commented:
kevp75 - thats cracking, do you know how you could display the different levels as a <ul> list?
0
Jackass03Author Commented:
kevp75 - all sorted, just banged in a response.write <ul><li> before the function and closed it off after.

Thanks again
0
kevp75Commented:
perfect.  no prob, thanks for the points :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.