Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Web Development
Expertise: Beginner
Jan 11, 2000

Using the FileSystemObject in an ASP Page

Question:
I am using the FileSystemObject in an ASP page to check if a file exsts using the FileExists method. The problem is that I don't want to hardcode the file path and the FSO doesn't recognize files and subfolders like the VB script in the ASP page does. How do I get the full file path for a specified file or subdirectory?

Answer:
The ASP Server object has a MapPath method that takes a virtual or relative path and returns the full physical path. Unfortunately it can't return parent directories using the ../ syntax.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date