fileMove

Version 23.4.8800


fileMove


Moves a file or directory to the path specified.

Required Parameters

  • source: The path of the file (including the filename) or directory to move.
  • destination: The path of the file (including the filename) or directory where the file or directory should be moved to.

Optional Parameters

  • force: Controls whether the operation creates missing directories in the destination path. The allowed values are true and false. The default is true.

Output Attributes

  • file:source: The full path of the source file or directory.
  • file:destination: The full path of the destination file or directory.

Example

<!-- Creating the input item with the associated source and destination attributes -->
<arc:set attr="input.source" value="/tmp/source/moveme.xml" />
<arc:set attr="input.destination" value="/tmp/destination/moveme.xml" />

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