TFS Command Line Get Command

Can you pls help me how to pull the latest version or label from the TFS through Command Line. I went through the msdn documentation. I am not able to get a clear picture.
I am expecting some command with example where I can pass the server name, Credentials and sourcepath and Destination path.
Basically I want to pull the get latest to a local path which  will be specified in the command line utility. Hope so I am clear. 
Pls help me.

11/11/2008 8:27:25 PM
📃 3408 articles.

💬 1 Replies

 You can use tf command line utility
This utility can be found in C:/ProgramFiles/Microsoft Visual Studio (9 or 8 )/Common7/IDE/tf.exe
To do get latest you can use
tf get itemspec [/version:versionspec] [/all] [/overwrite] [/force] [/preview] [/recursive] [/noprompt]
tf get is command
itemspec is used to get latest the specific item
/all switch is used to get all the items
/overwrite switch is used to overwrite all existing local files
/force /recursive and /noprompt are some other usefule switches which can be of your interest.
Prior to this you must have your project to be mapped with the TFS at least once.
if you are using /noprompt then it will not ask for any confimations so it will skip you asking user name and password to login to the TFS account.So use /noprompt carefully.
Hope this helps

Mark as Answer if the reply helps you
Visit me at my blog
Small Workarounds
3/23/2009 8:33:24 PM