FileSystem.Rename(String, String) Method

Top 

Description

Renames the specified file or directory sourcePath to the destinationPath. When moving a directory, all files and subfolders will be renamed, recursively. In the event that the rename operation overwrites existing files or directories, the rename is not atomic. An error will be reported if the rename operation is unsuccessful.

 

Timing Precision Mode

This page describes functionality in millisecond timing precision mode.

Click here to see the documentation for this object in nanosecond timing precision mode.

 

Method Signature

FileSystem.Rename(

String sourcePath,


String destinationPath)

 

 

Arguments

sourcePath


Description:

The source file or directory which is to be renamed.

 

 

destinationPath


Description:

The destination file or directory to which the source will be renamed. destinationPath and sourcePath must be of the same type.

 

 

 

Syntax

FileSystem.Rename(myString1, myString2);

 

 

See also

FileSystem Object

FileSystem.Rename

Interfacing with Files Guide