VB.NET Language in a Nutshell

   
Rename Procedure

Class

Microsoft.VisualBasic.FileSystem

Syntax

Rename( oldpath , newpath )

oldpath (required; String)

The current filename and optional path

newpath (required; String)

The new filename and optional path

Description

Renames a disk file or folder

Rules at a Glance

Programming Tips and Gotchas

The Rename procedure can be used to move a file from one folder to another and, optionally , to change the file's name at the same time. If the folder specified in newname exists and is different from that stated in oldname , the file will be moved to the folder specified in newname . If the filename in newname is also different, the file will be renamed at the same time.

VB.NET/VB 6 Differences

The Rename procedure is new to VB.NET.

   

Категории