|
|
|
|
- Operating mode in Windows Vista (and later)
fCopyDir (Function) In french: fRepCopie Copies the contents of a directory and its subdirectories. New in version 28
// Copy a directory Res = fCopyDir("C:\Directory\MyFiles", "D:\Documents\FileCopy", ... frConfirm + frProgress + frRecursive)
// Copy a directory Res = fCopyDir("C:\Directory\MyFiles", "D:\Documents\FileCopy", FilterFile)
PROCEDURE FilterFile(sSourcePath, sDestinationPath, flChange, nCustomParameter) // Don't copy the temporary files IF fExtractPath(sSourcePath, fExtension) ~= ".tmp" RESULT fcIgnore ELSE RESULT fcCopy END
Syntax
Copying a directory Hide the details
<Result> = fCopyDir(<Path of directory to copy> , <Path of destination directory> [, <Copy indicator>])
<Result>: Boolean - True if the image was copied,
- False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Path of directory to copy>: Character string Name and full (or relative) path of directory to copy (up to 260 characters). A UNC path can be used. Wildcard characters (*,?) are allowed in the file name. This directory name may (or may not) end with "\".
<Path of destination directory>: Character string Name and full (or relative) path of copied directory (up to 260 characters). A UNC path can be used. This directory name may (or may not) end with "\". This directory is automatically created if it does not exist.
<Copy indicator>: Optional constant (or combination of constants) Type of copy: | | frConfirm | Copy a directory and ask for confirmation before overwriting a directory with the same name.
| frProgress | A progress window is displayed.
| frRecursive | Subdirectories are processed. |
<Copy indicator> is empty by default. None of these options is selected.
Copying a directory by handling each copied file Hide the details
<Result> = fCopyDir(<Path of directory to copy> , <Path of destination directory> , <WLanguage procedure> [, <Pointer> [, <Copy indicator>]])
<Result>: Boolean - True if the image was copied,
- False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Path of directory to copy>: Character string Name and full (or relative) path of directory to copy (up to 260 characters). A UNC path can be used. Wildcard characters (*,?) are allowed in the file name. This directory name may (or may not) end with "\". <Path of destination directory>: Character string Name and full (or relative) path of copied directory (up to 260 characters). A UNC path can be used. This directory name may (or may not) end with "\". This directory is automatically created if it does not exist. <WLanguage procedure>: Procedure name Name of the WLanguage procedure ("callback") called for each file copied. This procedure is used to handle the current file. <Pointer>: Optional integer Pointer passed to <WLanguage procedure>. <Copy indicator>: Optional constant Type of copy: | | frRecursive | Subdirectories are processed. |
<Copy indicator> is empty by default: the process is not recursive. Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|