Advertisement
Guest User

momessssssoooo

a guest
Mar 19th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. using System;
  2. using System.IO;
  3.  
  4.  
  5. namespace esFile
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. /* File.Copy(@"c:\temp\myfile.bmp",@"c:\temp\myfile2.bmp",true);
  12.  
  13. string path=@"c:\temp\myfile3.bmp";
  14. File.Delete(path);
  15.  
  16. var content=File.ReadAllText(path);
  17.  
  18. var fileInfo=new FileInfo(path);
  19. fileInfo.CopyTo("...");
  20. fileInfo.Delete();
  21. if(fileInfo.Exists)
  22. {
  23.  
  24. }
  25. */
  26.  
  27. Directory.CreateDirectory(@"c:\temp\folder1");
  28. var files=Directory.GetFiles(@"c:\temp\folder1" , "*.*", SearchOption.AllDirectories);
  29. foreach(var file in files)
  30. Console.WriteLine(file);
  31.  
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement