Guest User

Untitled

a guest
Jun 25th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. void RenameThem()
  2. {
  3. DirectoryInfo d = new DirectoryInfo("c:/dir/");
  4. FileInfo[] infos = d.GetFiles("*.myfiles");
  5. foreach(FileInfo f in infos)
  6. {
  7. // Do the renaming here
  8. File.Move(f.FullName, Path.Combine(f.Directory.ToString(), "1" + f.Name));
  9. }
  10. }
Add Comment
Please, Sign In to add comment