DADiSP Worksheet Functions > Function Categories > File Manipulation > DELFILE

 

DELFILE

Purpose:

Deletes one or more files.

Syntax: 

DELFILE("srcname", confirm)

"srcname"

-

A string, the name of the file to delete. The name can include * or ? wildcard characters.

confirm

-

Optional, an integer confirm delete flag.

0:

Do not confirm (default).

1:

Confirm delete

Returns:

An integer, the count of the number of files deleted.

Example:

delfile("myfun.spl")

 

deletes the file myfun.spl in the current directory.

Example:

delfile("\spldir\*.spl")

 

deletes all files with extension .spl in the directory \spldir. The number of files deleted is returned.

Remarks:

DELFILE deletes a source file. The source name may contain the * and ? characters to specify multiple files.

 

See MOVEFILE to move one or more source files or a directory to a new destination and delete the original files.

 

See RMDIR to delete an entire directory.

See Also:

COPYFILE

FILEEXISTS

MKDIR

MOVEFILE

RMDIR