CeODAX.Delete Method

PocketBrowser 3.x API

The Delete Method of the ODAX ActiveX Object deletes the specified file.

Delete (Method of the ODAX ActiveX Object) Syntax
var status = object.Delete(fileName);

ParametersW Toggle Parameters

Items listed in this section indicate parameters, or attributes which can be set.

Name Possible Values Description
Default Value
FileName String File Name with full path to be deleted N/A

axReturns Toggle Return Values

Name Description
Status Returns 0 if no error or the return value from the windows API call GetLastError() if an error occurs

Examples Toggle Examples

var ax = new ActiveXObject("CeODAX.ODAX");
var fileName = '\\application\\test.xml';
var status = ax.Delete(fileName);
Copy example to clipboard Copy example to clipboard

Remarks Toggle Remarks

It's good practice to check if the file exists before deleting it. To do this use the FileExists() method which will support any file extension and will work as per normal delete command.

Info Toggle Additional Information

Supported Platforms Windows Mobile, Windows CE
Persistence Runs immediately.
Min. Requirements None