Remove-File

This command can be used to delete files. The operation and syntax are the same as the Windows shell command DEL (using wildcards and environment variables). In addition, any variables can be used.


Settings:

  • Path
    Path to the file(s) to be deleted. It is possible to use the wildcards * and ? and variables. Use the "..." button to select an existing file (on the packaging system) or enter the path manually.
  • Delete also all subdirectories
    Specifies that files that conform to the schema should also be deleted in subdirectories of the specified path. Particularly relevant when using wildcards.
  • Delete also all files in use
    This option ensures that files that are locked by Windows are removed the next time the system is restarted.
  • Use 32-Bit mode on x64 computer
    If the script is executed on a 64-bit operating system, the counterpart for 32-bit applications SysWOW64 can be used automatically when referring to the SYSTEM32 directory.


Example:

This example deletes all log files in the Windows directory and subdirectories. Files that are in use are marked for deletion the next time they are restarted.


Corresponds to DSM eScript command:

  • Delete


See also: