For this we need to use the "FileSystemObject".
(comments that won't be executed in green)
Using vb Syntax Highlighting
Set fso = CreateObject("Scripting.FileSystemObject") 'assign the FileSystemObject to fso
Folder = "C:\Temp" 'Path to the folder to delete, then re-create
If fso.FolderExists(Folder) Then 'Check if the folder exists to avoid script errors
fso.DeleteFolder Folder 'Delete folder
fso.CreateFolder Folder 'Re-create empty folder
End If
Folder = "C:\Temp" 'Path to the folder to delete, then re-create
If fso.FolderExists(Folder) Then 'Check if the folder exists to avoid script errors
fso.DeleteFolder Folder 'Delete folder
fso.CreateFolder Folder 'Re-create empty folder
End If
Parsed in 0.010 seconds, using GeSHi 1.0.8.4

