Click to See Complete Forum and Search --> : VBScript File Directory, One Up?


hume.tony
04-24-2009, 02:02 PM
This seems like it would have a simple enough answer but I cannot seem to find it. I need to open a file in the directory above the html file being used.

So, the html file's directory location is "dir1/dir2/page.html" and from that page I need to get to the file "dir1/file.txt"

In other languages it's "../file.txt" or "\file.txt" but I cannot figure out how to do it with VBScript.

Kuriyama
04-24-2009, 03:52 PM
You want to process or include a file that is one directory above the file you are currently executing?


<!--#include file="../somethinghere.html" -->

If you want to open the file for processing you need to use server.mappath and the file system object.