DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Command: FileDelete

Display all  Hide all

Command: FileDelete

Deletes files.

Call FileDelete(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  To delete .tdm, .tdms and .dat type DIAdem files and the associated binary files, which contain the bulk data, use the DataFileDelete command.

Examples

The following example checks whether the Example.txt file exists in the SCRIPT user folder. If the file exists, DIAdem deletes the file. You can restore the file in the Windows recycling bin.

VBScriptPython

 

If FilEx(ScriptReadPath & "Example.txt") Then
  Call FileDelete(ScriptReadPath & "Example.txt ", TRUE)
End If

Related Topics

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

Was this information helpful?