change a file name in vb.net

X

xke

Other than copying the file under a different name and delete the
initial file, is there any other way to change a file name in vb.net ?

Thanks,
xk
 
T

Tom Shelton

Other than copying the file under a different name and delete the
initial file, is there any other way to change a file name in vb.net ?

Thanks,
xk


System.IO.File.Move (sourcePath, destinationPath)
 
H

Herfried K. Wagner [MVP]

xke said:
Other than copying the file under a different name and delete the
initial file, is there any other way to change a file name in vb.net ?

In addition to the other reply: You can use VB's 'Rename' function or
'My.Computer.FileSystem.RenameFile'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top