“...the best thing since sliced bread when it comes to managing projects and their environments...” “...our confidence in the reliability and repeatability of the deployment process has been restored...” “...we can now react at the speed of business...” “BuildMaster is absolutely swell!” “...it's 2:45 AM your time?! Do you guys never sleep?” “...manual, error-prone deployments are a thing of the past...” “...extremely capable software, especially in an enterprise environment...” “...all of my projects are building wonderfully and are fully integrated into deployment...” “BuildMaster made us re-think what proper deployment is...” “...BuildMaster makes sense of incremental builds and their very liquid feature sets...” “...we implemented a *real* deployment process...” “BuildMaster is a great tool for automating the build process, but stands head and shoulders above other tools...” “...this is a very solid piece of software!”

Transferring Files with Masking

Transferring files - either from one server to another or just from one directory to another - may be the most basic step of any software deployment. BuildMaster's Transfer Files action is a simple concept with a lot of power. In this article, we'll take a look at some of the ways to use BuildMaster's file masking rules to include or exclude certain files from the transfer action.

The Transfer Files Action

Before talking about masking, let's take a look at the Transfer Files action editor itself.

Transfer Files Action Editor

The Source and Target fields allow you to specify source and target servers/directories (naturally); in this example I'll be using C:\TransferFilesDemo\Source and C:\TransferFilesDemo\Target on the same server for demonstration purposes.

In the Files/Folder Mask field, you can provide masking rules that will tell BuildMaster which files to include or exclude. By default, all files and subdirectories are included with the * mask. The Delete files/directories not present in source option does exactly what it says: if a file is detected in the target that was not in the source, it will be deleted; this makes it possible to mirror a target directory to match a source.

Masking Examples

To illustrate BuildMaster's masking rules, let's consider some examples. Consider that for all examples, the Target directory is empty, and the Source directory contains the following files and folders:

BigDoc.pdf
Documentation.pdf
WordDoc.docx
WordDoc 2.docx
TextFile1.txt
TextFile2.txt
Subfolder\BigDoc in subfolder.pdf
Subfolder\WordDoc in subfolder.docx

The following table provides some examples of masking on this set of files.

Mask

Files Transferred

Description

*.docx

*.pdf

BigDoc.pdf

Documentation.pdfWordDoc.docx

WordDoc 2.docx

Subfolder\BigDoc in subfolder.pdf

Subfolder\WordDoc in subfolder.docx

All .docx and .pdf files are transferred; every other file is skipped.

*

!*.docx

BigDoc.pdf

Documentation.pdfTextFile1.txt

TextFile2.txt

Subfolder\BigDoc in subfolder.pdf

All files except .docx files are transferred.

*.docx

!Subfolder\*

WordDoc.docx

WordDoc 2.docx

All .docx files except anything in Subfolder

*

!*Doc*

TextFile1.txt

TextFile2.txtSubfolder\

All files and folders except those with Doc in them are transferred.

Other Uses for Masks

In addition to the Transfer Files action, you can use File Masking in any action editor that says it is supported. For example, the Delete Files action allows you to specify files to delete using the same masking rules.