How to get the list of currently checked out files in TFS?

If you are wondering about what files are currently checked out in specific project in TFS, there is a command line statement in TFS you can run to fetch list of files checked out by specific user or all user.

tf.exe status $/[PROJECTNAME] /user:* /s:http://[TFS SERVER NAME]:[PORT] /recursive

For example,

tf.exe status $/DevProject /user:shailp /s:http:/tfsdev/:8080

This will return all files that are checked by user ‘shailp’ under project ‘DevProject’.

tf.exe status $/DevProject /user:* /s:http://tfsdev:8080

This will return all checked-out files under project ‘DevProject’.

If you want to rename the branch or move branch, you CAN”T do this operation if some files are checked out by someone.  So above command will help you to see what files are checked out by who.  If you have an administrative rights on TFS server, you can undo checked out or check in  changes that some one is currently working on that..

Here is the command how to undo check out some one’s changes

tf undo [/workspace:workspacename[;workspaceowner]] [/server:servername] [/recursive] itemspec

For Example,

tf undo /workspace:Dev-Main;shailp /server:http://tfsdev:8080 $/DevProject/Dev/Main/Admin/Test.aspx

This will undo the changes ‘shailp’(user) made in Test.aspx file. Dev-Main is ‘shailp’ workspace.

If you have any question, leave a comment here.  If this post really helps you, please click the Google +1 button to show it really helps you save your time.

Tagged with:
Posted in Microsoft Technology
3 comments on “How to get the list of currently checked out files in TFS?
  1. xster says:

    TFS Power Tools are far easier to use with integration in VS and free
    http://msdn.microsoft.com/en-us/vstudio/bb980963.aspx

  2. Shailesh says:

    @xster, That’s true you can use power tools. But some time you may be in the situation that you might need to take permission to install any kind of software in your computer or can’t install for some reason or some one is command line savvy. But if we have power tools installed, it’s really easy to use. I agree

  3. Terry says:

    Power tools does allow me to see the files checked out. Is there any way to get a date of when the files were checked out?

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
Ads
OutbackDirect.co.uk is a trading site of World of Power.co.uk Limited. Outback Direct is the official Outback Consumer Warranty, Parts and Accessory Partners for the UK. We currently hold in stock 1000’s of parts and accessories for current and older Outback barbecues. We endeavour to ensure rapid and secure product delivery the length and breadth of mainland United Kingdom, this factor coupled with our excellent customer service has led to the market position we currently enjoy.
outback barbecue
omega 300 gas barbecue
Omega 250 Gas Hooded BBQ
------------------------------------------------------------ Silver Sky Imports is a unique online marketplace that offers unique handicrafts from Tibet and Nepal. Launched in 2003, Silver Sky Imports is currently the largest supplier of handmade items from the Himalayas. We specialize in the largest variety of Tibetan Singing Bowls and Crystal Singing Bowls online and include individual sound samples, pictures and descriptions for each bowl. Some of our other products include Tibetan Prayer Flags, Tingshas, Bell and Dorje, Incense, Felted Wool Handbags, Wood Masks, Prayer Wheels, Gongs, Bronze Statues, and Tibetan Meditation Rugs. monks
------------------------------------------------------------ Airpush, a mobile ad network that is only two years old, has quickly grown to one with over 5,000 advertisers. One thing they've heard from that sea of advertisers over the past 12 months, and especially over the past six, is that real-time bidding (RTB) capabilities are now a must. To answer those needs, the company today unveiled AirDSP, a platform meant to easily connect advertisers to RTB exchanges. Read more: Mobile RTB
------------------------------------------------------------ Danish site about electronic cigarettes E Cigarette, Electronic Cigarette and E Cigarettes e cigaret
------------------------------------------------------------ DrugRisks.com drugrisk​ recall ​informat​ion​ drugrisk​ yaz​
------------------------------------------------------------