After we branch for release, there are certain configuration files that need to be updated. Currently, I’m getting latest version of all the source code on the specific (new) branch. This is time consuming and takes up a lot of disk space.
Is there a way to search/loop through the particular branch and only getting files that match a certain criteria?
E.g:
Loop through files under branch on the TFS server
If file name matches "foo.proj" or file name matches "foo.ini"
Get latest version of the file
The “get” part is easy using the command line interface to TF (tf get $/project/foo.proj). I’m not to sure how to loop through the server objects without getting latest version first.
I used this in the end:
Custom install the TFS Powershell snap in using the tftp.exe that you download.
Add the snap in:
Powershell script:
I couldn’t find a way to get the latest version using the snap in, so I had to use the ol’ trusty tf.exe.