Copies a folder with all its contents.
# Metadata
Platforms: desktop, server OS: mac, windows, linux Introduced: 1.1.1 Security:
# Syntax
revCopyFolder folderToCopy, destinationFolder
# Params
- 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.
# Examples
revCopyFolder "E:/Settings","C:/Program Files/My App/Settings"
revCopyFolder "data","backups"
# 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 files, 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 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 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)
# Tags
# See
- **glossary:** return, standalone application, file, shell, handler, platform, command, Windows, main stack, OS X, AppleScript, group, result, Unix, message, folder, subfolder, Mac OS - **message:** startup, openBackground, preOpenStack, openStack - **command:** create alias, revDeleteFolder, revCopyFile - **function:** result - **library:** Common library, library - **control structure:** function