TFS command line script to get the latest version, check and check, software

I use WinXP, VS 2008 and Team Explorer to connect to Team Foundation Server.

I need a script (e.g. BAT script file) the following:

  • Get the latest version of a folder in Team Project.
  • Check the folder files in Team Project.
  • Check the folder files in Team Project.

My TFSProject $/Arquitectura/Main/ maps to path C:\TFS\Arquitectura

Does anyone have an example code or suggestion?

+79
scripting tfs checkout checkin
Sep 21 '10 at 17:25
source share
3 answers

Use tf.exe at the command line.

In the following examples, %PathToIde% usually on the path as follows: %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE or on Windows x64: %ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE (depending on version Visual Studio and installation settings).

An example to obtain:

 cd C:\TFS\Arquitectura "%PathToIde%\TF.exe" get $/Arquitectura/Main /recursive 

Example for verification:

 cd C:\TFS\Arquitectura "%PathToIde%\TF.exe" checkout $/Arquitectura/Main /recursive 

Example for verification:

 cd C:\TFS\Arquitectura "%PathToIde%\TF.exe" checkin $/Arquitectura/Main /recursive 

See tf commandline for more details.

+135
Sep 21 '10 at 18:51
source share

"C: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ Common7 \ IDE \ tf.exe" get "$ / ProjectName / Main" / force / recursive

+6
May 17 '12 at 14:57
source share

get updated code for windows 7 64bit

 "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" get /recursive 

It worked for me.

+3
Mar 07 '14 at 11:05
source share



All Articles