Using the FileSystemObject in an ASP Page

Using the FileSystemObject in an ASP Page

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?

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.


About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist