Version: 8
restore

Contents

Method

DeleteFileByName

ModuleFileSystem
LibraryCore
Action

Deletes a file by name.

Parameters

FilePath (string): The path of the file to be deleted.

 

The FilePath parameter name is only available from v3.2 onwards.

In v3.1 and earlier FileName must be used instead. While the earlier name will still work, we recommend that, from v3.2 onwards, FilePath is used instead.

Return values

Status (string). Either:

    • "Deleted FilePath"
    • Last error string and execution error status if the file failed to be deleted.

Deleted (boolean): true if the file existed and was successfully deleted, or false for any other reason (e.g. file could not be deleted due to permissions, file did not exist, etc.). This is only available from v3.2.

Example

Delete a Nomad lsz file.

This uses the newer FilePath parameter name. Replace with FileName for v3.1 and older.
FileSystem.DeleteFileByName(FilePath:"C:\\ProgramData\\1E\\NomadBranch\\1EP000AA_1.lsz");
Platforms
  • Windows
  • Linux
  • MacOS
  • Solaris Intel
  • Solaris Sparc
  • Android
Notes