You are viewing the documentation of TeamCity 9.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.


Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: This doesn't work any more


Moreover, Swabra gives the ability to dump processes which lock directory by the end of the build (requires handle.exe)

Swabra can be added as a build feature to your build configuration regardless of what set of build steps you have. By configuring its options you can enable scanning checkout directory for newly created, modified and deleted files and enable file locking processes detection.




Files cleanup

Select whether you want to perform build files cleanup, and when it will be performed.

Clean checkout

Select the Force clean checkout if cannot restore clean directory state option to ensure that the checkout directory corresponds to the sources in the repository at the build start. If Swabra detects any modified or deleted files in the checkout directory before the build start, it will enforce clean checkout. The build will fail if Swabra cannot delete some files created during the previous build.
If this option is disabled, you will only get warnings about modified and deleted files.

Paths to monitor

Specify newline-separated set of +|-:path rules to define what files and folders should be involved in files collection process (by default and until explicitly excluded, the entire checkout directory is monitored).
The path can be relative (based from build's checkout directory) or absolute and can include Ant-like wildcards.
If no +: or -: prefix is specified, a rule as treated as "include".
Specifying a directory affects its entire content and sub-directories.
Rules on any path should come in order from more abstract to more concrete, e.g. use -:*/dir/* to exclude all dir folders and their content, or -:some/dir, +:some/dir/inner to exclude some/dir folder and all its content except inner subfolder and its content.


Note that after removing some exclude rules, it is advisable to run a clean checkout.

Locking processes

Select whether you want Swabra to inspect the checkout directory for processes locking files in this directory, and what to do with such processes. Note that  handle.exe is required on agents for locking processes detection.

Verbose output

Check this option to enable detailed logging to build log.


handle.exe is present on agents only after the upgrade process.

You may also download handle.exe, extract it on the agent and set up the handle.exe.path system property manually.

Please note that running handle.exe requires some additional permissions for the build agent user. For more details please read this thread.