Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void RenameThem()
- {
- DirectoryInfo d = new DirectoryInfo("c:/dir/");
- FileInfo[] infos = d.GetFiles("*.myfiles");
- foreach(FileInfo f in infos)
- {
- // Do the renaming here
- File.Move(f.FullName, Path.Combine(f.Directory.ToString(), "1" + f.Name));
- }
- }
Add Comment
Please, Sign In to add comment