Using VB.Net
I cannot able to delete the database file. File also not in use.
File.Delete("G:\1.txt") - It is deleting the file
File.Delete("G:\DB1.bak") - It is not deleting
I used below code also,
Kill("G:\DB1.bak") - It is also not deleting
What is the problem with my code.
As, you said that the file is not in use. Then refer to the following code part to delete all the files from a directory passed to it.