User Tools

Site Tools



TFS - Command line

TF in the path

To set tf program in the path, add this line :

SET PATH=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE;%PATH%

Update a repository

"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf.exe" get /recursive C:\Projets

Checkout a file

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\TF.exe checkout $(FULL_CURRENT_PATH)

Display full history in console

tf history /recursive /noprompt /format:Detailed .

Display history in a date range

tf history /recursive /noprompt /format:Detailed /version:D"04/09/2014"~D"08/09/2014" .

Scripts to get history from specific date

param (
    [string]$date = ""
$env:Path = "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE;"+$env:Path
$version = ""
if($date -notlike "")
    $today = Get-Date -format dd/MM/yyyy
    $version= "/version:D" + $date + "~D" + $today
tf history /recursive /noprompt /format:Detailed $version .
technical_notes/public/tfs-command-line.txt · Last modified: 2014/09/08 11:12 by Fabien Arcellier