FILE_Copy
<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > File > FILE: functions working on files > FILE_Copy |
Description
Copy a file from one location into another location/name.
Syntax
n = FILE_COPY(FileName_Source, FileName_Destination)
Returns
Number.
0 means no errors.
Parameters
Name |
Type |
Optional |
Meaning |
FileName_Source |
String |
No |
Source file name, full path. |
FileName_Destination |
String |
No |
Destination file name, full path. |
Remarks
The attributes of the source file are inherited by the destination file, with the exception of the Archive attribute, which is always set ON for the destination file.
Attempting to copy a file that is read locked (preventing read access), a error 70 will occur ("Permission denied").
If the destination file already exists, it will be overwritten.
If it is not possible to overwrite the existing destination file (for example, it is marked as read-only or in use by another program), the result will be a error 70 ("Permission denied").
Restrictions
Wildcards are not supported.
See also
Examples