[thelist] OpenTextFile Absoulute Path

Jason Bauer jbauer at chimesnet.com
Tue Nov 19 10:30:00 CST 2002


> C:\inetpub\wwwroot\dir1\subdir1\file.txt
> C:\inetpub\wwwroot\dir1\subdir2\file1.asp
>
> I want to open "file.txt" using OpenTextFile.  OpenTextFile requires an
> absolute path to the file.  My "file1.asp" is a template so the exact path
> will change depending on what directory the "file1.asp" template is saved
> to.
>
> Is there any way to determine what the abolute path of "file.txt" is from
> where "file1.asp" resides?

The absolute path of file.txt is as you stated above,
C:\inetpub\wwwroot\dir1\subdir1\file.txt, no matter where your .asp file is.
So, file.asp can move anywhere it wants to and that absolute path to
file.txt will remain the same.

So, looks like you are all good!

The relative path to the .txt file is the one that would change. But, since
OpenTextFile can take an absolute path
(http://www.html.dk/dokumentation/vbscript/HTML/vsmthopentextfile.htm), you
should be okay using the path you mentioned above.

---
Jason Bauer
jbauer at chimesnet.com
Programmer/Analyst
Chimes, Inc.





More information about the thelist mailing list