Creating folders in classic ASP

I need to check if the directory exists, and if not, create it. I know how to do this in .NET, but I'm struggling with how to do this in classic ASP. Can anyone help?

+3
source share
1 answer

Use the following snippet. Before executing the code, make sure that you have write permission.

set filesys=CreateObject("Scripting.FileSystemObject")
If  Not filesys.FolderExists("c:\website\") Then      
  filesys.CreateFolder ("c:\website\")   
End If
+7
source

All Articles