Correct me if I'm wrong...
It appears that out of the 1800+ classes in the .Net framework, there isn't
a file rename method (discounting the rename function in the vb namespace).
And that the solution is to move the file to the same directory with a
different destination name.
Does that correctly summarize it?
Richard
Richard,
I've always done it like that, which is pretty straightforward. However, if
anyone knows a better/different way...

Signature
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
> Correct me if I'm wrong...
>
[quoted text clipped - 8 lines]
>
> Richard
Yes -
Afraid so. You have to move the file for renaming. I have also
faced same prob.
Shankar
10/27/2004 11:36:18 AM
Richard L Rosenheim <richard@rlr.com> wrote in message
<OvvdUs#uEHA.3376@TK2MSFTNGP12.phx.gbl>
> Correct me if I'm wrong...
>
[quoted text clipped - 6 lines]
>
> Richard
Nishith Pathak - 27 Oct 2004 10:35 GMT
Dear all,
There is Rename function available in Microsoft.VisualBasic namespace and is
only available to VB.Net and not to other language like C#. seems strange
when i do it. But the best universal and standard solution to rename the file
is to use the File.Move method but in case if you r working on VB.NET, you
got the rename function to rename your files.
Nishith
> Yes -
> Afraid so. You have to move the file for renaming. I have also
[quoted text clipped - 17 lines]
> >
> > Richard
Jon Skeet [C# MVP] - 27 Oct 2004 11:24 GMT
> There is Rename function available in Microsoft.VisualBasic namespace and is
> only available to VB.Net and not to other language like C#.
No, you can use the Microsoft.VisualBasic namespace from C#. The Rename
method is a static one in the FileSystem class.
I can't see that it's likely to have a significantly different effect
to using File.Move though.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Chris Dunaway - 27 Oct 2004 15:13 GMT
> Yes -
> Afraid so. You have to move the file for renaming. I have also
> faced same prob.
Why is that a problem? It works as intended. When calling the Move method
to the same folder, I believe it just changes the name and does not
actually "move" anything.

Signature
Chris
dunawayc[AT]sbcglobal_lunchmeat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.