Nexial Automation

Test Automation Platform for everyone!

X

io » moveFiles(source,target)

Description

This command moves the file(s)s from one location (source) to other (target). Th target parameter can be a file or directory. If the specified target does not exist and it ends with either / or ‘' - indicating that it is a directory - then Nexial will attempt to create such directory before moving source to target.

Since the intended target file(s) could already exist, Nexial provides a few different options to handle such condition. The System variable nexial.io.copyConfig is created for this purpose. One can define this System variable with one of the following values to alter how Nexial handle such situation:

  • keepOriginal: don’t copy file (default behaviour)
  • override: override existing file
  • backup: taking backup of existing file and copy new file

Parameters

  • source - the source location of the file to be moved
  • target - the target location to move to

Example

Script:
script

Output:
output

See Also