1. Home
  2. FDELETE directive

FDELETE directive

Deletes files.

No options

Parameter

NAME = texts Names of the files to delete

Description

FDELETE allows you to delete external file. The names of the files are specified, in texts. These can include the wildcards * (to mean any sequence of characters) and ? (to mean any single character). 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

FDELETE 'D:\\Data\\Tempfile.dat'

deletes the file Tempfile.dat in the directory (or folder) D:\Data. As a more convenient alternative, the PC version of Genstat allows you to use / instead: i.e. you could put

FDELETE 'D:/Data/Tempfile.dat'

Options: none.
Parameter: NAME.

See also

Directives: FCOPY, FRENAME, CLOSE, ENQUIRE, OPEN.

Commands for: Input and output.

Updated on January 12, 2022

Was this article helpful?