How can I delete a file in C# e.g. C:\test.txt, although apply the same kind of method like in batch files e.g.

if exist "C:\test.txt"

delete "C:\test.txt"

else 

return nothing (ignore)

11 Answers
11

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *