Hi,
I tried to rename a file using FileInfo but I don't see how I could do it ?
Is there a way to rename a file ?
thnx
Christian
Tim Wilson - 23 Jul 2004 14:18 GMT
Use the File classes static/Shared Move method. It doesn't seem all that
intuitive, I know.

Signature
Tim Wilson
.Net Compact Framework MVP
> Hi,
>
[quoted text clipped - 5 lines]
>
> Christian
Jon Skeet [C# MVP] - 23 Jul 2004 14:24 GMT
> I tried to rename a file using FileInfo but I don't see how I could do it ?
Try FileInfo.MoveTo or File.Move.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Herfried K. Wagner [MVP] - 23 Jul 2004 17:17 GMT
* "Chris" <christianc@pandora.be> scripsit:
> I tried to rename a file using FileInfo but I don't see how I could do it ?
In VB it's 'Rename(OldPath, NewPath)'.

Signature
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/