FileRemove Procedure

Deletes a file specified by sFileName.

Syntax

[ lStatus = ] FileRemove ( sFileName )

The FileRemove procedure syntax has the following parts:

 

Name

Type

Description

lStatus

Long

Status, 0 for success and <> for failure

sFileName

Val BString

Name of existing file to delete

Comments

The function returns 0 if it was successful or -1 if it failed.

Example

 

lStatus = FileRemove ("\\~~a.txt")

If lStatus <> 0

print "Error During FileRemove..."

Endif

See Also

FileCreate, FileRename, GetDir