Name statement (LotusScript® Language)

Renames a file or directory.

Syntax

Name oldName As newName

Elements

oldName

A string expression whose value is the name of an existing file or directory, optionally including a path.

newName

A string expression whose value is the name to be given to the file or directory, optionally including a path. The newName cannot be another file or directory that already exists.

Usage

To move a file, specify complete paths in both oldName and newName. Use the same file name for both arguments if you don't want to rename it.

You can't move a file from one drive to another except under Windows NT and Windows 95.

You can't rename a file or directory to itself except under Windows NT and Windows 95.

You can rename a directory, but you can't move it except under UNIX.

You can't rename the current directory.

Example