Last updated: August 26, 2026.
Scripting.FileSystemObject lets Classic ASP inspect folders and work with server-side files. Use only trusted paths under an application-controlled directory.
Create the object and inspect a file
<%
Dim fso, filePath
Set fso = Server.CreateObject("Scripting.FileSystemObject")
filePath = Server.MapPath("/App_Data/report.txt")
If fso.FileExists(filePath) Then
Response.Write Server.HTMLEncode(fso.GetFileName(filePath))
End If
Set fso = Nothing
%>Common members
| Member | Purpose |
|---|---|
FileExists, FolderExists | Check a path. |
GetFile, GetFolder | Return file or folder objects. |
CreateTextFile, OpenTextFile | Write or read text. |
CopyFile, MoveFile, DeleteFile | Manage files. |
Do not combine request values with filesystem paths. The IIS application-pool identity needs only the minimum required permissions, and downloadable or executable directories should not be writable by the application.