|
|
|
|
|
- Moving a directory and its content
- Operating mode in Windows Vista (and later)
fMoveDir (Function) In french: fRepDéplace Moves the content of a directory into another 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 get more details on the error, use ErrorInfo with the errMessage constant.
<Path of directory to move>: Character string 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 "\".
<Path of destination directory>: Character string 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 "\".
<Move indicator>: Optional constant (or combination of constants) The following constants can be used (no option is selected by default): | | frConfirm | The content of the directory is moved once the overwriting of the directory with the same name is confirmed.
| frProgress | A progress window is displayed.
| frRecursive | The 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 line of code: 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 recreated.
- The initial directory and its content are destroyed.
To move the directory and its content, we recommend that you use fRename.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|