DIAdem API Reference

Command: DataFileDelete

  • Updated2023-02-21
  • 3 minute(s) read

Display all  Hide all

Deletes .tdm, .tdms, or .dat type DIAdem files and the associated binary files that contain the bulk data.

Call DataFileDelete(FSSourceName, [FSPreserveUndo], [FSProgressBar])

Input Parameters

FSSourceName Specifies the source file or source folder for DIAdem file and folder commands.
[FSPreserveUndo] Specifies whether DIAdem moves files and folders into the recycle bin or deletes them irretrievably. The default value is FALSE which specifies that DIAdem deletes the files irrevocably.
[FSProgressBar] Specifies whether the progress bar, which the operating system displays during long operations, is visible. If you assign the value TRUE to the FSProgressBar variable, DIAdem does not display the progress bar. The default value for the FSProgressBar variable is FALSE.
Note  DIAdem deletes local read-only files without a confirmation prompt. DIAdem does not delete read-only files in a network.
Note  The page Loading Bulk Data - General contains important information on the extended loading behavior of TDM and TDMS files.

Example

The following example checks whether the Example.dat file exists in the NAVIGATOR user folder. If the file exists, DIAdem deletes the file and the respective binary files. You can restore the files in the Windows recycling bin.

VBScriptPython

 

If FilEx(DataReadPath & "Example.dat") Then
  Call DataFileDelete(DataReadPath & "Example.dat ",TRUE)
End If

Related Topics

Command: DataFileLstGet | Command: DataFileMove | Command: DataFileRename | Command: DirLstWrite | Command: FileAttrClear | Command: FileAttrSet | Command: FileClose | Command: FileCloseAll | Command: FileCopy | Command: FileDateSet | Command: FileDelete | Command: FileMove | Command: FileOpen | Command: FileRename | Function: DataFileSize