FileCopy (Copy File)

The FileCopy function is used to copy a file from one drive on the datalogger to another.

Syntax

FileCopy ( FromFileName, ToFileName )

Remarks

The FileCopy function returns True if the operation is successful or False if it fails. If a file with the same name already exists, the existing file will be overwritten. The FileHandle for the file must be closed (FileClose) before the file can be copied.

Parameters

FromFileName

The name of the file to be copied. It is a string entered in the format "Device:FileName". If a Device is not specified, the CPU drive will be assumed. Valid devices are:

Device Description
CPU: Internal CPU
CRD: External Memory Card
USR: User-Defined Drive
USB: SC115

The USR device is an area of memory that can be set up by the user by assigning a value to the datalogger's UsrDriveSize setting in the Status table. This drive must be set to at least 8192 bytes, in 512-byte increments (if the value entered is not a multiple of 512 bytes, the size will be rounded up).

ToFileName

The destination (drive) and name for the copied file. Like the FromFileName parameter, it is a string entered in the format "Device:FileName". If a Device is not specified, the CPU drive will be assumed.