TFS Top Tip #4: The Command Line Client is your friend.

| 2 Comments

If you are going to be doing more than the basic check-in / check-out options then it pays to get to know the command line client – tf.  The command line client is actually the most flexible and powerful client to Team Foundation Version Control.

For more information, consult the MSDN help documentationTeamprise users will be glad to hear that a large percentage of the commands are implemented in V1.0 of our command line client meaning that you can do these actions from a Mac or Unix box as well (install instructions are posted in the Knowledge Base).  If you are running on Windows then you are probably better off sticking to Microsoft’s command line client that gets installed as part of the Team Foundation Server client installation (and accessible via a Visual Studio 2005 command shell).

For example, to show all the check-outs by everyone on a path in the repository:-

  tf status /server:http://yourservernamehere:8080 /user:* /recursive $/TeamProject/

For more examples, see an excellent post from James Manning or some of my previous posts:-

The command line client is also excellent for scripting purposes (our automated build system relies heavily on it).  I urge you to spend a few moments with a strong cup of coffee, the help documentation and just have a play around.  Once you realise what commands are available then you’ll know what’s possible if you come across a situation in the future where you reach limitations in the UI.

2 Comments

Hello... I have some files that have to be checked out through a batch file, stuff happens to them, then checked in. This was find in SourceSafe... However, I'm not on TFS, and below you will find my code. The problem is, when it does the check out through the command line, it pops open this "Source Control Settings" and has 2 checkboxes. 1 asking me for Enable multiple check-out. The other to Enable get latest on check-out. I do not want either to occur NOR do I want the popup asking me this to even show...

CAN YOU HELP A GIRL? PLEASE! LOL... I'm dying!

Thanks so much,
Jennifer Overholt
(code I have written so far below - nuttin fancy)

SET TFDIR="C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE"

cd C:\DEV\

%TFDIR%\TF.exe configure /server:vcst-tfs
%TFDIR%\tf checkout -I "$/Engineering Applications/Typelib/Managed/VPCodecDriver.dll" -R -K:Checkout

pause

I meant to say I am NOW using TFS 2008! :) DOH!

Jenn

Leave a comment

Archives

Creative Commons License
This blog is licensed under a Creative Commons License.