- Handling errors
- Operating mode in Windows Vista (and later)
fDirRename (Function) In french: fRepRenomme Renames a directory.
// Rename a directory IF NOT fDirRename("C:\Directory", "C:\RenamedDirectory") THEN ErrorInfo(errMessage) END
Syntax
<Result> = fDirRename(<Directory to rename> , <New directory name>)
<Result>: Boolean - True if the modification was performed,
- False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Directory to rename>: Character string - Full path of the directory to rename (up to 260 characters). A UNC path can be used.
- Path relative to the current directory (returned by fCurrentDir)
Wildcard characters are not allowed.CAUTION: The directory to rename must not be the current application directory.
<New directory name>: Character string New directory name (the full path of the directory with the new name must not exceed 260 characters).Wildcard characters are not allowed. Remarks Handling errors fDirRename throws an error in the following cases: - the directory to rename does not exist,
- the directory to rename is blocked (e.g., one of its files is open),
- the path of the directory to rename is invalid,
- <New directory name> or <Directory to rename> is an empty string,
- the new directory already exists.
Remark: This function can be used on an empty directory.
This page is also available for…
|
|
|
|