DIAdem API Reference

Command: FolderDelete

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

Display all  Hide all

Deletes folders with files.

Call FolderDelete(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 remains visible during long operations. 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  If you use the FolderDelete command for a folder that contains files, DIAdem deletes these files without a confirmation prompt. DIAdem also deletes a local read-only folder without a confirmation prompt. DIAdem does not delete read-only folders in a network. If you want to delete only certain files from a folder, you can use wildcards for the FSSourceName variable.

Examples

The following example deletes the SCRIPT user folder with all its subfolders and files. The deleted folders and files are removed to the Windows recycle bin.

VBScriptPython

 

Call FolderDelete(ScriptReadPath, TRUE)

The following example deletes from the SCRIPT user folder all the subfolders and files that start with the letter a. The deleted folders and files are removed to the Windows recycle bin.

VBScriptPython

 

Call FolderDelete(ScriptReadPath & "a*", TRUE)

Related Topics

Command: FolderAttrClear | Command: FolderAttrSet | Command: FolderCopy | Command: FolderCreate | Command: FolderMove | Command: FolderRename | Command: FolderUnzip | Command: FolderZip | Command: PathAddTrailingBackslash