Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

creating folders in Classic ASP

Tags:

asp-classic

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?

like image 203
user517406 Avatar asked Dec 16 '22 13:12

user517406


1 Answers

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
like image 101
AbrahamJP Avatar answered Dec 21 '22 23:12

AbrahamJP