## FDUP Duplicate component file, reclaiming wasted space

The FDUP function makes a copy of an existing tied component file. Component ownership and timestamp information is retained in the copy of the file. Because the file is copied component-by-component, any wasted space caused by fragmentation of the original file is not reflected in the copy. (You can tell how much space is wasted in a file by using FSIZE.)

The syntax is:

          DESTNAME FDUP TIENO {PASS}

DESTNAME is a character vector specifying the name of the destination file. The name is specified in the same way as for FCREATE. If the name contains a directory-separator character (: / or \), it is treated as a full host path name, and you need to specify the file extension, by convention `.aqf`. Otherwise it is treated as basic file name only, optionally preceded by a volume number 0 to 9, separated by one or more spaces from the name. In the latter case, the file is created in the directory 0 to 9 specified (the actual path is set the preferences dialog or MOUNT), and the file extension `.aqf` is added automatically.

Note that DESTNAME must not be the same as the original file name. If you want to achieve the effect of reclaiming space whilst keeping the file name unchanged, you should first make a copy using a temporary file name, then erase the original and rename the temporary file back to the original name.

Topic: APLX Help : Help on APL language : System Functions & Variables : FDUP Duplicate component file, reclaiming wasted space

[ Previous | Next | Contents | Index ]