Guest User

Untitled

a guest
Nov 19th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. string[] filePaths = Directory.GetFiles(@"c:TEMP");
  2. foreach (string filePath in filePaths)
  3. {
  4. if (filePath.Contains(".bmp"))
  5. File.Delete(filePath);
  6. }
  7.  
  8. Directory.GetFiles(@"C:TEMP", "*.bmp");
  9.  
  10. string[] t = Directory.GetFiles(Environment.CurrentDirectory, "*.pdf");
  11. Array.ForEach(t, File.Delete);
  12.  
  13. string[] t = Directory.GetFiles(Environment.CurrentDirectory, "*.txt");
  14. Array.ForEach(t, File.Delete);
Add Comment
Please, Sign In to add comment