Directory c:\\test has 50 or so files in it, no subdirectories.
If IO.Directory.Exists(\"C:\\test\") Then IO.Directory.Delete(\"C:\\test\", True)
I had the same problem. I ended up deleting only the contents of the directory @"C:\test" and copying the new files to the directory. That was my problem:
@"C:\test"
Using Directory.Delete() and Directory.CreateDirectory() to overwrite a folder