Straightforward question: Renaming a file

VBISCOOL
01-10-2005, 08:11 AM
Hello,

I'm a bit new to IO stuff.

How do i rename a file in the filesystem so that it's new name is "myNewFileName"?

Thanks :cool:

NickOlsen
01-10-2005, 12:10 PM
Hello,

I'm a bit new to IO stuff.

How do i rename a file in the filesystem so that it's new name is "myNewFileName"?

Thanks :cool:


You can do a file.move

System.IO.File.Move("C:\Temp\temp.txt", "C:\Temp\myNewFileName.txt")

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum