- Operating mode in Windows Vista (and later)
fCopyDir (Function) In french: fRepCopie Copies the contents of a directory and its subdirectories.
// Copy a directory Res = fCopyDir("C:\Directory\MyFiles", "D:\Documents\FileCopy", ... frConfirm + frProgress + frRecursive)
Versions 19 and later
// Copy a directory Res = fCopyDir("C:\Directory\MyFiles", "D:\Documents\FileCopy", FilterFile)
PROCÉDURE FilterFile(sSourcePath, sDestinationPath, flChange, nCustomParameter)
// Don't copy the temporary files IF fExtractPath(sSourcePath, fExtension) ~= ".tmp" RESULT fcIgnore ELSE RESULT fcCopy END
New in version 19
// Copy a directory Res = fCopyDir("C:\Directory\MyFiles", "D:\Documents\FileCopy", FilterFile)
PROCÉDURE FilterFile(sSourcePath, sDestinationPath, flChange, nCustomParameter)
// Don't copy the temporary files IF fExtractPath(sSourcePath, fExtension) ~= ".tmp" RESULT fcIgnore ELSE RESULT fcCopy END
// Copy a directory Res = fCopyDir("C:\Directory\MyFiles", "D:\Documents\FileCopy", FilterFile)
PROCÉDURE 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 copy was performed,
- False otherwise. To get the details of the error, use ErrorInfo with the errMessage constant.
<Path of directory to copy>: Character string (with quotes) 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 "\".
Versions 15 and later New in version 15 <Path of destination directory>: Character string (with quotes) 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.
Versions 15 and later New in version 15 <Copy indicator>: Optional constant (or combination of constants) Type of copy to perform: | | 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. Versions 19 and later New in version 19 Business / UI classification : Business Logic
This page is also available for…
|
|
|