I am writing a site that I structured like:
mysite.com/yourplaceNAME
YourplaceNAME changes all the time as users set up their pages.
I have a default.asp page that sits in each dir and populates info depending on the directory name - in the above example yourplaceNAME
To get the dir name I have used
Code:
Set fso = CreateObject("Scripting.FileSystemObject")
Path=request.querystring("\")
Set ts=fso.GetFolder(Server.MapPath("\"))
Set folder = fso.GetFolder(Server.Mappath("\"))
Set subFolders = folder.SubFolders
For Each folderObject in SubFolders
strDirectory = folderObject.Name 'make dir name string for db
But it does not get the current dir that I am in eg:
mysite.com/yourplaceNAME
instead it gives a different dir and then the code will either give the wrong info, or no info.
Could someone help me to get the name of the dir that I am in?
Thank you for your time :)