What code can i use ?
-
Hi I am using vb.net2003, Does anyone know any code I can use to delete files in a folder as well as the folder the files are located in? Thanks for any help
You need to manually delete the files first. Directory.GetFiles will give you a list of files to delete.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
Hi I am using vb.net2003, Does anyone know any code I can use to delete files in a folder as well as the folder the files are located in? Thanks for any help
To delete files, use: My.Computer.FileSystem.DeleteFile("C:\File_To_Delete.txt") You can also select whether you want the file you are deleting to goto the recycle bin or just to be permanantly deleted. Just use: My.Computer.FileSystem.DeleteFile("C:\File_To_Delete.txt", FileIO.RecycleOption.DeletePermanently)
-
Hi I am using vb.net2003, Does anyone know any code I can use to delete files in a folder as well as the folder the files are located in? Thanks for any help