I know about the Kill() and RmDir functions, but RmDir only works if the folder is empty. Is there a special command to delete a folder, with contents or not?
I know about the Kill() and RmDir functions, but RmDir only works if the folder is empty. Is there a special command to delete a folder, with contents or not?
Back in the day, you would use rmdir /s /q [dir], /q doesnt prompt user, and /s deletes all files and subdirectories.... Dont know how thatll help you, but the switches are there.
The Delete method of the Directory object has an overload that allows you to specify if you want a recursive delete, that also deletes the files and subfolders in the directory:
System.IO.Directory.Delete(String, Boolean)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.