DELETE.FILE

DELETE.FILE

Top  Previous  Next

 

The DELETE.FILE command deletes one or both portions of a file.

 

 

Format

 

DELETE.FILE {DATA | DICT} file.name {, subfile} {options}

 

where

 

file.nameis the VOC name of the file to be deleted. The DATA prefix may be used to delete only the data portion of the file. The DICT prefix may be used to delete only the dictionary portion of the file.

 

subfileis the subfile to be deleted from a multifile. If omitted and file.name refers to a multifile, the entire multifile will be deleted. Use of a subfile name implies use of the DATA keyword, leaving the dictionary in place.

 

optionsare chosen from the following:
FORCEis used to delete files with non-default names.
NO.QUERYsuppresses the confirmation prompt when using a select list or when deleting all elements of a multi-file. The NO.SEL.LIST.QUERY mode of the OPTION command can be used to imply this option.

 

 

If no file name is specified and the default select list is active, the DELETE.FILE command will use this list to determine the files to be deleted.

 

Deleting the data portion of a file deletes the associated operating system directory and clears field 2 of the VOC record describing the file. Deleting the dictionary portion of a file deletes the directory representing the dictionary and clears field 3 of the VOC record.

 

If the DELETE.FILE command results in a VOC record with fields 2 and 3 both null, the VOC record is also deleted. Thus deleting both portions of a file, the data portion of a file which had no dictionary or the dictionary portion of a file which had no data portion would also delete the VOC record.

 

Where the operating system name of the file recorded in the VOC entry is not the default name for the file (file.name for the data portion, file.name.DIC for the dictionary portion), the DELETE.FILE command prompts for confirmation unless the FORCE option is used. This traps accidental deletion of files which are remote to the account or for which file.name is not the primary VOC reference.

 

 

Example

 

DELETE.FILE DICT INVENTORY

 

This command deletes the dictionary part of the file named INVENTORY.

 

 

See also:

CREATE.FILE, LISTF, LISTFL, LISTFR