0

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)

Thanks.

2
Contributors
2
Replies
7
Views
8 Years
Discussion Span
Last Post by BullzEyezz
0

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");

Edited by Ramy Mahrous: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.