0

Greetings,

How to change a file name using C# code with fixed path to the subject file?

Do I need to copy/create a new file with new name and delete the old one or is there a way to change the name without doing above.

Rds

3
Contributors
10
Replies
11
Views
8 Years
Discussion Span
Last Post by Ramy Mahrous
0

I think there no method to do so, you can use DOS commands and call\send parameters to them from C# application.

0

Can you help me with that?

I think there no method to do so, you can use DOS commands and call\send parameters from them from C# application.

0

With pleasure ProcessStartInfo commandPromptProcess = new ProcessStartInfo("cmd.exe"); Find out how to make use of this.

0

Which system file does this ProcessStartInfo belongs to? I mean what do i need to add

using System.ProcessStartInfo? or something else

With pleasure ProcessStartInfo commandPromptProcess = new ProcessStartInfo("cmd.exe"); Find out how to make use of this.

0

Thanks, I was just looking for an efficient and quick way.

I guess File.Move(old,new) was too much to look for?

0

How can I get the file extension?

Please mark the thread as solved.

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.