Matrix DeleteFile( String sPathName )
The return value is 1 on success or 0 on failure.
String sPathName
The directory path and filename of the file to be deleted.
This module deletes a file. The file must be accessible to the Windows operating system of the client computer. The module calls the Windows function DeleteFile to delete the file.
declare DataObject dobj; x = 1:10; dobj = DataObject.Create( "Sample", x ); run GetPersonalFilesDirectory( path ); pathname = path + "Data Sets\_DeleteMe_.sas7bdat"; dobj.WriteToFile( pathname ); ok = DeleteFile( pathname ); if ok then print "OK"; else print "Function failed";