Chong Posted October 31, 2003 Posted October 31, 2003 Will anyone show me how to delete a .rtf file in a folder for me? When I click the Delete button on the form, I like the to program to go into a folder which I specified the path and delete a file that matches a criteria. I'm using the SaveFileDiaglog to save the file, but I don't know how to delete it. Many thanks for any help! ljCharlie Quote
Administrators PlausiblyDamp Posted October 31, 2003 Administrators Posted October 31, 2003 System.IO.File.Delete("c:\test.rtf") should do the trick - just replace the filename with the name of the file you want to delete. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Chong Posted October 31, 2003 Author Posted October 31, 2003 Thank you very much. It works! That's exactly what I'm looking for. ljCharlie Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.