PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Moving a directory and its content
  • 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
Moves the content of a directory into another directory.
Versions 15 and later
WINDEVJava This function is now available for the Java applications.
WEBDEV - Server codePHP This function is now available for the PHP sites.
New in version 15
WINDEVJava This function is now available for the Java applications.
WEBDEV - Server codePHP This function is now available for the PHP sites.
WINDEVJava This function is now available for the Java applications.
WEBDEV - Server codePHP This function is now available for the PHP sites.
// Moving the content of a directory
// The content of the "C:\Directories\MyFiles" directory is moved
// into the "D:\Documents\FileCopy" directory
Res is boolean
Res = fMoveDir("C:\Directories\MyFiles", "D:\Documents\FileCopy", frRecursive)
IF Res = False THEN
Error(ErrorInfo(errMessage))
END
Syntax
<Result> = fMoveDir(<Path of Directory to Move> , <Path of Destination Directory> [, <Move Indicator>])
<Result>: Boolean
  • True if the content of the directory was moved,
  • False otherwise. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Path of Directory to Move>: Character string (with quotes)
Name and full (or relative) path of the directory whose content must be moved (up to 260 characters). A UNC path can be used. The wildcard characters (*,?) are allowed. This directory name may (or may not) end with "\".
Versions 15 and later
WindowsLinux This parameter can be in Ansi or Unicode format.
New in version 15
WindowsLinux This parameter can be in Ansi or Unicode format.
WindowsLinux This parameter can be in Ansi or Unicode format.
<Path of Destination Directory>: Character string (with quotes)
Name and full (or relative) path of the destination directory (up to 260 characters). A UNC path can be used. This directory name may (or may not) end with "\".
Versions 15 and later
WindowsLinux This parameter can be in Ansi or Unicode format.
New in version 15
WindowsLinux This parameter can be in Ansi or Unicode format.
WindowsLinux This parameter can be in Ansi or Unicode format.
<Move Indicator>: Optional constant (or combination of constants)
The following constants can be used (no option is selected by default):
frConfirmThe content of the directory is moved once the overwriting of the directory with the same name is confirmed.
WEBDEV - Server code This constant is not available.
frProgressA progress window is displayed.
WEBDEV - Server code This constant is not available.
frRecursiveThe content of the source directory is moved (files and sub-directories). If the source directory contains some files or sub-directories and if this constants is not specified, the copy is not performed.
<Move Indicator> is empty by default. None of these options is selected.
Remarks

Moving a directory and its content

To move the content of the directory, only the path and the name of the directory to move must be specified. For example, the code line:
fMoveDir("C:\MyDirectories\MyFiles", "D:\MyDocuments\FileCopy", frRecursive)
  • Copies the files found in "C:\MyDirectories\MyFiles" into "D:\MyDocuments\FileCopy". The source directory is not re-created.
  • The initial directory and its content are destroyed.
To move the directory and its content, we recommend that you use fRename.
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 used is not found 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 found in the system directories (Windows directory or "Program Files" directory).
Programming tip: To handle and/or modify the files without having 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).
Note: In Windows Vista (and later), the virtualization mechanism is used to make the applications compatible with Vista. If the file is created in a system directory without having sufficient rights, this file will actually be created in another directory (C:\Users\<LOGIN>AppData\Local\VirtualStore\Windows\). In this case, the file cannot be shared between several applications.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Java wd230java.jar
Linux wd230std.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment