Navigation:  Reference > Functions >

DeleteFile()

Print this Topic Previous pageReturn to chapter overviewNext page

 

DELF(1)

 

PURPOSE

This function will attempt to delete a file.  If the deletion is successful, a logical .T. will be returned.

 

PARTS

 

1 f/c/eRequired - The name of the file to be deleted.  This must include the path and extension in standard notation.

 

RETURN TYPE - L

If the file is found and deleted the function will return a value of .T.; otherwise the returned value is .F.

 

NOTE: Warning to use this function you can not have the file you are trying to delete open make sure you close the file first.

Example

define del_ok type L

delete_file:

  del_ok = del(temp_file_name)

  if del_ok

    Msg 'We Deleted the file ...'

 else

      Msg 'Sorry we could not delete the file..'

 endif

  ret

SEE ALSO

RENF, DELF, RENF()

 

 


Page url: http://www.cassoftware.com/tas/manual/deletefile().htm