RenameFile
method of the My.Computer.FileSystem
object to rename a file by supplying the current location, file name, and the new file name. This method cannot be used to move a file; use the MoveFile
method to move and rename the file.My.Computer.FileSystem.RenameFile
method to rename a file. This example renames the file named Test.txt
to SecondTest.txt
.newName
contains path information (ArgumentException).Nothing
(ArgumentNullException).newName
is Nothing
or an empty string (ArgumentNullException).newName
(IOException).
|