fileDelete

Version 24.2.9039


fileDelete


Deletes a file or directory.

Required Parameters

  • file: The path of the file (including the filename) or directory to delete.

Output Attributes

  • file:file: The path of the file (including the filename) or directory that was deleted.

Example

<!-- Creating the input item with the full path to the file to be deleted --> 
<arc:set attr="input.file" value="/tmp/myfiles/deleteme.txt"/>

<!-- Calling fileDelete and passing in the input item -->
<arc:call op="fileDelete" in="input" out="result" >
  <!-- Optional: Logging information about the deleted file to the application log -->
  <arc:set attr="_log.info" value="The file [result.file:file] was deleted."/>  
</arc:call>