I'm making a project that gets folder and file names in a specific path and I want to edit the folder or file names? (e.g: folder name is X.Men.DVDrip I want to change it to X Men DVDrip)
I have the path of the folder, but I dont know how to change the file name.

Can anyone help me with this issue ?
(am using VS C# 2008)


File | You may use Move method in System.IO like that

System.IO.File.Move(@"C:\old.txt", @"C:\new.txt"); //it renames the file old to new.txt

Folder | the same

System.IO.Directory.Move(@"C:\oldfolder", @"C:\newfolder");

Thanks a lot Ramy. I'll give it a try