Save 15% on Instant Deploy Bare-Metal Servers in 26 Global Markets with Coupon Code: EdgeSave

How can I return a directory of current page in ASP?

set FSO = server.createobject(“Scripting.Filesystemobject”)
Full_ASP_FILE_PATH = server.mappath(Request.ServerVariables(“PATH_INFO”))
PATH_ONLY = Fso.GetParentFolderName(Full_ASP_FILE_PATH)
Response.write “This ASP page is being run in the folder: ” & PATH_ONLY

Share on Twitter
Share on Facebook