File manipulations

The following commands are available:
  • file-delete: this command will let you delete a file. If the file is not existing, the command reports a success and doesn't try to delete the file.
  • file-copy: this command will let you make a copy of a file to another directory. If the source file doesn't exist, NBi will report an ExternalDependencyNotFound exception. If the file is already existing on the destination then the file is overwritten. Finally, if the target directory doesn't exist, it will be created.
For all of them, The xml attribute named name expects the name of the file (to copy or delete) and the attribute path is there to stipulate the full path of the file to delete or where the file will be copied.

    <file-delete path="Temp\" name="toto.xls"/>

In the case of the copy command, the attribute source-path tell us where is located the file to copy. Note that for this command a rename of the file isn't supported.

    <file-copy source-path="Backup\" path="Temp\" name="toto.xls"/>

Last edited Oct 7, 2014 at 10:44 PM by Seddryck, version 2


No comments yet.