FileSystemObject.CopyFolder()

JScript3.0+syntax

							filesystemobject.CopyFolder(source, destination, overwrite)

Description

The CopyFolder() method copies a folder from a source to a destination. This method takes three parameters. The first parameter, source, is a string specifying source path and filename from which to copy. The second parameter, destination, is a string specifying destination path a filename to which to copy. The final parameter, overwrite, is a Boolean value indicating whether to overwrite an existing file or not.

Example

Listing 9.72 shows how to use the CopyFolder() method. A new FileSystemObject is created, providing access to the computer's file system. It is then used to copy all the contents of the folder tmp to ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.