githubEdit

DirectoryCopy

Copies a directory from one location to another

Method Signature

DirectoryCopy(source=[string], destination=[string], recurse=[boolean], filter=[any], createPath=[boolean], overwrite=[boolean])

Arguments

Argument
Type
Required
Description
Default

source

string

true

The source directory

destination

string

true

The destination directory

recurse

boolean

false

whether to recurse in to sub-directories and create paths

false

filter

any

false

A file or directory filter to pass

*

createPath

boolean

false

whether to create any nested paths required to the new directory

true

overwrite

boolean

false

whether to overwrite existing files at the destination

false

Examples

Simple DirectoryCopy Example

Copy directory from one place to another.

directoryCopy( expandPath( "./mySourceDirectory" ), expandPath( "../MyDestinationDirectory" ) );

Additional Examples

Run Examplearrow-up-right

Last updated

Was this helpful?