I need to check if a directory exists, and if not then create it. I know how to do this in .NET, but I am struggling with how to do this in classic ASP. Can anybody help?
Use the following snippet. Make sure you have write permission before executing the code.
set filesys=CreateObject("Scripting.FileSystemObject")
If Not filesys.FolderExists("c:\website\") Then
filesys.CreateFolder ("c:\website\")
End If
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With