DirectoryCopy()
Copies the contents of a directory to a destination directory.
DirectoryCopy( source=string, destination=string, recurse=boolean, filter=any, createPath=boolean );
Returns: void
| Argument | Description | Default |
|---|---|---|
|
source
string,
required
|
edit
Pathname of directory from which you copy content. Alias: directory |
|
|
destination
string,
required
|
edit
Path of the destination directory. If not an absolute path, it is relative to the source directory. Alias: newDirectory |
|
|
recurse
boolean,
optional
|
edit
If true, copies the subdirectories, otherwise only the files in the source directory. Alias: recursive |
false |
|
filter
any,
optional
|
edit
Filter to be used to filter the data copied:
|
|
|
createPath
boolean,
optional
|
edit
if set to false, expects all parent directories to exist, true (default) will generate necessary directories |
Examples
editdirectorycopy("directorypath","directorypath")
//one directorypath to another directory path...
See also
- File handling
- DirectoryCreate()
- DirectoryDelete()
- DirectoryExists()
- DirectoryList()
- DirectoryRename()
- <cfdirectory>
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)