Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetFolder question

Status
Not open for further replies.

credo

Programmer
Jul 26, 2001
50
GB
I have some ASP code sitting on a web server that gets the current directory that the asp file sits in:

pathStr = request.servervariables("PATH_TRANSLATED")
scriptStr = Replace(request.servervariables("SCRIPT_NAME"), "/", "\")
Dim nameArr
nameArr = Array()
nameArr = Split(scriptStr, "\")
scriptStr = nameArr(UBound(nameArr))
currentDir = Replace(pathStr, scriptStr, "")

Set Folder = FSO.GetFolder(currentDir)

I want to get the path of a subdirectory within this directory. eg. Say the subfolders name was Fred.

... could i use
Set Folder = FSO.GetFolder(currentDir+"\Fred")

if not, how would I reference this path ?

thanks in advance,
Credo

 
If that is not working, instead of using "+", use "&" like:

Set Folder = FSO.GetFolder(currentDir & "\Fred")


Hope this helps... -Ovatvvon :-Q
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top