ZorroRojo
Member
I've managed to learn how to delete a directory.
So how do I create it again?
I want to delete and recreate the same directory to get rid of all the files in the directory.
VB.NET:
Dim objDirectory AsNew DirectoryInfo("c:\data\WrongDate")
'If the directory WrongDate exists it gets deleted and recreated.
'This ensures files from the previous day are not in the directory.
If objDirectory.Exists Then
objDirectory.Delete()
EndIf
I want to delete and recreate the same directory to get rid of all the files in the directory.
Last edited by a moderator: