fr de es it nl pl pt pt_BR mk sq ca ar fa vi ja ru zh zh_TW eo
Home > lang > copy
 
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration   
Documentation
History
 
COPY
Syntax
COPY Source path TO Destination path

Copies a file from Source path to Destination path.

The destination path does not need to have the same name as the source path.

Note that you cannot copy directories recursively with this function.

Examples

' Save the gambas configuration file
COPY User.Home &/ ".config/gambas/gambas.conf" TO "/mnt/save/gambas.conf.save"

Errors

MessageDescription
File already exists (#38) The destination file already exists.

This instruction internally uses the functions OPEN, READ, WRITE and CLOSE. So it can raise any of their errors.

See also

File & Directory Functions  OPEN  READ  WRITE  CLOSE