The Wiert Corner – irregular stream of stuff

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

  • 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,402 other followers

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

One Response to “using tf to list the workspaces for the current directory in Team Foundation System”

  1. […] PS: This post supercedes using tf to list the workspaces for the current directory in Team Foundation System « The Wiert Cor…. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: