Makes copies of files.
No options
Parameters
OLD = texts |
Name of each file to copy |
---|---|
NEW = texts |
Name for the new copy of each file |
OVERWRITE = string tokens |
Whether to overwrite any existing files (yes , no ); default no |
Description
FCOPY
allows you to make a copy of an external file. The names of the original files are specified, in texts, but the OLD
parameter. The file names for the copies are specified by the NEW
parameter. If no path is included in the file name, it is assumed to be in the current working directory (which can be defined by the WORKINGDIRECTORY
option of the SET
directory). If you need to define the path, remember that the character \is the continuation symbol in Genstat. So this character needs to be duplicated in a string to avoid Genstat interpreting it as a continuation: for example
FCOPY 'Today.Dat'; NEW='D:\\April\\18.dat'
copies the file Today.dat
to the file 18.dat
in the directory (or folder) D:\April
. As a more convenient alternative, the PC version of Genstat allows you to use /
instead: i.e. you could put
FCOPY 'Today.Dat'; NEW='D:/April/18.dat'
By default FCOPY
gives a fault if the new file already exists, but you can set parameter OVERWRITE=yes
to overwrite it.
Options: none.
Parameters: OLD
, NEW
, OVERWRITE
.
See also
Directives: FDELETE
, FRENAME
, CLOSE
, ENQUIRE
, OPEN
.
Commands for: Input and output.