Product Logo

CNS Menu

Dynamic Menus

Functions

CNSMenu_File_Copy

NameCNSMenu_File_Copy
Description

Copies a file to a new location and/or a new name.

Return TypeText
FormatCNSMenu_File_Copy ( Source ; Destination )
Required Parameters
Source

The path and file name of the file you want to copy.

Destination

The path to the folder where you want the copy. [You can optionally specify a file name to rename the file.]

Examples
Example 1

Copies the file "copy.txt" from the "source" folder to the "destination" folder on Mac.

CNSMenu_File_Copy( "/source/copy.txt" ; "/destination/" )
Example 2

Copies the file "copy.txt" from the "source" folder to the "destination" folder on Windows.

CNSMenu_File_Copy( "c:\source\copy.txt" ; "c:\destination\ " )
Example 3

Copies the file "copy.txt" from the "source" folder to the "destination" folder and renames the file "copied.txt" on Windows.

CNSMenu_File_Copy( "c:\source\copy.txt" ; "c:\destination\copied.txt" )
Example 4

Copies the file "copy.txt" from the "source" folder to the "destination" folder and renames the file "copied.txt" on Mac.

CNSMenu_File_Copy( "/source/copy.txt" ; "/destination/copied.txt" )
Example 5

Copies the file "list.txt" from the "Documents" folder to the "FileServer" network share on Mac. The network share must be mounted prior to calling this function, as it is unable to mount a share.

CNSMenu_File_Copy( "/Users/John/Documents/list.txt" ; "/Volumes/FileServer/list.txt" )