PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WINDEV, WEBDEV, WINDEV Mobile 25 feature!
  • Error management
  • Operating mode in Windows Vista (and later)
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Renames a directory.
Example
// Rename a directory
IF NOT fDirRename("C:\Directory", "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 find out the error details, use ErrorInfo associated with the errMessage constant.
<Directory to rename>: Character string (with quotes)
  • 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.
WindowsLinux This parameter can be in Ansi or Unicode format.
AndroidAndroid Widget This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
Windows Mobile This path must be a full path or a UNC path. It cannot be a relative path.
iPhone/iPad This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its subdirectories.
<New directory name>: Character string (with quotes)
New directory name (the full path of the directory with the new name must not exceed 260 characters).
Wildcard characters are not allowed.
WindowsLinux This parameter can be in Ansi or Unicode format.
iPhone/iPad This parameter is case sensitive.
Remarks

Error management

fDirRename generates 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.
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)

Operating mode in Windows Vista (and later)

If this function does not operate properly in Windows Vista (and later), check whether the file or directory used is not in one of the system directories (Windows directory or "Program Files" directory).
Indeed, in Windows Vista (and later), with the UAC mechanism (User Account Control) enabled, you must have the administrator privileges to handle and/or modify the files or directories in the system directories (Windows directory or "Program Files" directory).
Programming tip: To handle and/or modify the files or directories without administrator privileges, you should:
  • avoid writing into the Windows directory or into the "Program Files" directory,
  • use the system directory corresponding to the application (returned by SysDir associated with the srCommonAppData constant).
Component : wd250std.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment