Grab the RSS feed

Asp get file path

Just was searching all over the net to find a asp code get the absolute path to set dsn, top search results of the Google didn't give me any solution. So I got this from one of the asp book.

A simple script. This will be useful most of the time to set ODBC DSN connection!

You can replace the yourFileName with the file name you are using to get the path.


response.write (server.mappath("test.asp"))
Results:

C:\Inetpub\vhosts\mydomain.com\subdomains\demo\httpdocs\test.asp


Thanks.

0 comments:

  •