|
RemoveFile
int
RemoveFile
(string filename)
Return
Value
Returns OK if the file has been
successfully removed. Otherwise, returns FAIL.
Parameters
filename
– the name of
the file to be removed.
Remarks
Call this
function to remove the file indicated by filename.
Package
Plug in module:
nd_fileplg.npl
Example
The following
example demonstrates the use of RemoveFile.
# Example for RemoveFile
WriteString("C:\dummy.txt",
"Remove test")
CloseFile("C:\dummy.txt")
if(RemoveFile("C:\dummy.txt")
== -1)
Println("Failed
to remove the file.")
else
Println("The
file has been successfully removed.")
endif
Output of the example
script:
The file has been successfully
removed.
|