The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,312 other followers

Archive for May 28th, 2014

using tf to list the workspaces for the current directory in Team Foundation System

Posted by jpluimers on 2014/05/28

Since Visual Studio is always in a 32-bit directory, I needed the SetProgramFilesX86 batch file from

Windows batch file to set ProgramFilesX86 directory for 32-bit program files on x86 and x64 systems.

Here is a small batch file to list workspaces by any user for the current directory (assuming that directory is mapped to a workspace):

call "%~dp0SetProgramFilesX86.bat"
:: assume Visual Studio 2005:
::"%ProgramFilesX86%\Microsoft Visual Studio 8\Common7\IDE\tf" workspaces /owner:* /computer:* 
:: assume Visual Studio 2010:
"%ProgramFilesX86%\Microsoft Visual Studio 10.0\Common7\IDE\tf" workspaces /owner:* /computer:*

It uses TF, and assumes default locations for various Visual Studio versions based on the internal version number.

A generic TF batch file that finds the TF is this one:

call "%~dp0SetProgramFilesX86.bat"
:: assume Visual Studio 2005:
::"%ProgramFilesX86%\Microsoft Visual Studio 8\Common7\IDE\tf" %*
:: assume Visual Studio 2010:
"%ProgramFilesX86%\Microsoft Visual Studio 10.0\Common7\IDE\tf" %*

–jeroen

Posted in Batch-Files, Development, Scripting, Software Development | 1 Comment »

 
%d bloggers like this: