TeamCity: how to copy zip file as artifact with a different name (instead of including it)

teamcity

Solution

As per my comment:

in your batch file instead of using

set zipname = bar.zip 

you can use something like

set zipname = foo_%build.number%.zip. 

If TeamCity is doing your build then you can reference this from within MSBuild using `$(BUILD_NUMBER)`

Problem

My build creates a zip file, which I would like to designate as the build artifact with one exception: I would like to use the build number in the name of the zip file. Something like: `foo/bar.zip => foo_v%build.number%.zip` Unfortunately, what I end up with is a bar.zip inside of b

Original source