SyntaxFix
Write A Post
Hire A Developer
Questions
You can do it via FileInfo or DirectoryInfo:
DirectoryInfo di = new DirectoryInfo("TempDir"); di.Delete(true);
And then recreate the directory