Product Logo

CNS Barcode

Scan and Generate Barcodes

Functions

CNSBC_File_Copy

NameCNSBC_File_Copy
Description

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

Return TypeText
FormatCNSBC_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.

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

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

CNSBC_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.

CNSBC_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.

CNSBC_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.

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