Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

[1.4] - Before copying the files and flattening them, make sure \OutputEmpiedFlattened is actually empty.

 


2. Copy file(s) from the agent's work space and put them in the server's workspace.

...

[2.4] - Before copying the files and flattening them, make sure \TestEmpiedFlattened is actually empty. 


3. Copy files using different wildcards

...

[3.5] - Matches any files ending with ".xml" anywhere underneath the server workspace's \Test directory.

 


4. Copy files and maintaining directory structure

...

[4.4] - Any files matched are put in the \Output\Test\Stuff directory and the directory they were found in will be created in \Output\Test\Stuff .

 


5. Copy files to the workpace's root directory

...

[5.2] - Matches any files in the root of the agent's workspace that start with "AppInstallers" and ends with ".exe" and puts them in the server's workspace root.

 


6. Excluding files from being copied

...

[6.2a], [6.2b] and [6.2c] also executed together. The agent pattern Output\** starts generating a list of files it matches, as a match is found it's checked against the two exclude patterns [6.2b] and [6.2c]. This example will copy all files in Output\ except for those that end with ".xml" or ".dll" and puts them in the \Installers directory on the server-side workspace.


7. Extracting archive files copied from the server's work space to the agent's workspace. 

...

Add the colon ":" operator after the zip extension on the left-hand side of a server-to-agent rule to specify that the archive file should be extracted. Note that only zip archive files are currently supported.

Rule Example Type 7 - Archive extracting rules
Code Block
7.1 Report.zip: > Report/ExtractedFiles
7.2 Report.zip: -> Report/ExtractedFlattened
7.2 Report.zip: >> Report/ExtractedFiles
7.2 Report.zip: ->> Report/ExtractedFlattened

The archive file in the server workspace is automatically extracted after being copied to the agent workspace. Note that the operators for preserving and emptying the destination folder are also taken into account when extracting. Also note that archive files can only be extracted when copying from the server workspace to the agent workspace.

[7.1] - Extracts all the files in the archive Report.zip to the folder Report/ExtractedFiles. Preserves the directory structure within the zip file.
[7.2] - Extracts all the files in the archive Report.zip to the folder Report/ExtractedFlattened. Flattens the zip directory structure so that all files are extracted directly to Report/ExtractedFlattened.
[7.3] - Extracts all the files in the archive Report.zip to the folder Report/ExtractedFiles. Empties the destination folder before extracting files.
[7.4] - Extracts all the files in the archive Report.zip to the folder Report/ExtractedFlattened. Empties the destination folder before extracting files. Flattens the zip directory structure so that all files are extracted directly to Report/ExtractedFlattened.


8. Extracting archives using wildcards

You can also add a pattern to specify which files to extract from the server archive file.

Rule Example Type 8 - Archive extracting rules with wildcards
Code Block
8.1 Report.zip:/*.html > ReportHtmlFiles
8.2 Report.zip:/**.html > Report/HtmlFiles
8.3 Report.zip:/Main/**.xml > MainReport/XmlFiles
8.4 Report.zip:/Report/**/Main/**.html > MainReport/HtmlFiles

[8.1] - Extracts all the html files in the root folder of the archive Report.zip to the folder ReportHtmlFiles. Preserves the directory structure within the zip file.
[8.2] - Extracts all the html files in the archive Report.zip to the folder Report/HtmlFiles. Preserves the directory structure within the zip file.
[8.3] - Extracts all the xml files under the Main folder in the archive Report.zip to the folder MainReport/XmlFiles. Preserves the directory structure under the Main folder within the zip file.
[8.4] - Extracts all the html files under the Report folder in the archive Report.zip which are under a sub-folder named Main to the folder MainReport/HtmlFiles. Preserves the directory structure under the Report folder within the zip file.


9. Compressing files in the agent's workspace to an archive to copy to the server's work space.

Specifying a zip file extension on the left-hand side of a agent-to-server rule means that the agent files should be compressed. The colon ":" after the zip name operator is optional, but can be used to specify a destination sub-folder (see 10. below). Note that only zip archive files are currently supported.

Rule Example Type 9 - Archive creating rules
Code Block
9.1 Report.zip < Report/Files/**
9.2 Report.zip: < Report/Files/*.html
9.3 Report.zip: <- Report/Files/**.html
9.4 Report.zip: << Report/**/Main/*.xml

The matching files in the agent workspace are compressed to an archive file which is then copied to the server workspace. Note that the operators for preserving and emptying the destination folder are also taken into account when extracting. Also note that files can only be compress to an archive when copying from the agent workspace to the server workspace.

[9.1] - Compress all the files under the folder Report/Files to the archive Report.zip. Preserves the directory structure under Report/Files when adding files to the zip file.
[9.2] - Compress all the html files directly in the folder Report/Files to the archive Report.zip. Preserves the directory structure under Report/Files when adding files to the zip file.
[9.3] - Compress all the html files under the folder Report/Files to the archive Report.zip. Flattens the directory structure so that all files are compressed to the root folder of the zip file.
[9.4] - Compress all the xml files directory under the folder Report directly under a sub-folder named Main to the archive Report.zip. Preserves the directory structure under Report when adding files the zip file. Deletes any existing Report.zip files created in previous rules and creates a new zip file.


10. Compressing archives to a sub-folder within an archive

You can also defined a sub-folder within the zip file to compress the files to.

Rule Example Type 10 - Archive creating rules with sub-folder
Code Block
10.1 Report.zip:MainReport < Report/Files/**
10.2 Report.zip:MainReport/Html < Report/Files/**.html

The matching files in the agent workspace are compressed to the specified subfolder in the archive file which is then copied to the server workspace.

[10.1] - Compress all the files under the folder Report/Files to the MainReport sub-folder in the archive Report.zip. Preserves the directory structure under Report/Files when adding files to the zip file.
[10.2] - Compress all the html files under the folder Report/Files the MainReport/Html sub-folder in the archive Report.zip. Preserves the directory structure under Report/Files when adding files to the zip file.