Name: revCopyFolder

Type: command

Syntax: revCopyFolder <folderToCopy>, <destinationFolder>

Summary:
Copies a <folder> with all its contents.

Introduced: 1.1.1

OS: mac, windows, linux

Platforms: desktop, server

Example:
revCopyFolder "E:/Settings","C:/Program Files/My App/Settings"

Example:
revCopyFolder "data","backups"

Parameters:
folderToCopy:
The folderToCopy specifies the name and location of the folder. If you
specify a name but not a location, LiveCode assumes the folder is in the
defaultFolder. 

destinationFolder:
The destinationFolder specifies the name and location of the folder
where the copy will be created. If you specify a name but not a
location, LiveCode assumes the destination folder is in the
defaultFolder. 

The result:
The <revCopyFolder> <command> uses system services on each <platform> to
perform the copy. On <Mac OS> and <OS X|OS X systems>, it uses
<AppleScript>; on <Windows> and <Unix> systems, it uses the <shell>
<function>. Any errors encountered are <return|returned> in the <result>
<function>. 

Description:
Use the <revCopyFolder> <command> to make a copy of a <folder> inside
another <folder>.

The <revCopyFolder> <command> makes a copy of the entire <folder>,
including all <file|files>, <subfolder|subfolders>, and their contents.
The <folder> remains in its original location and the copy is placed in
the new location.

>*Note:* When included in a <standalone application>, the <Common library>
>  is implemented as a hidden <group> and made available when
> the <group> receives its first <openBackground> message. During the
> first part of the <application|application's> startup process, before
> this <message> is sent, the <revCopyFolder> <command> is not yet
> available. This may affect attempts to use this <command> in
> <startup>, <preOpenStack>, <openStack>, or
> <preOpenCardhandlers(message)> in the <main stack>. Once the
> <application> has finished starting up, the <library> is available and
> the <revCopyFolder> <command> can be used in any <handler>.

>*Note:* To copy a bundle on Mac OS X systems, use the <revCopyFile>
> command

>*Note:* On Linux and OS X systems, folder paths can contain the tilde
> (~) character, referring to the current user's home directory. Using
> these chars is not supported by revCopyFolder, and it is necessary to
> replace the tilde with its literal value (eg /home/userName)

References: create alias (command), revDeleteFolder (command),
revCopyFile (command), function (control structure), result (function)
application (glossary), return (glossary),
standalone application (glossary), file (glossary), shell (glossary),
handler (glossary), platform (glossary), command (glossary),
Windows (glossary), main stack (glossary), OS X (glossary),
AppleScript (glossary), group (glossary), result (glossary),
Unix (glossary), message (glossary), folder (glossary),
subfolder (glossary), Mac OS (glossary), Common library (library),
library (library), startup (message),
openBackground (message), preOpenStack (message), openStack (message)

