TFS & Visual Studio ALM – by Neno Loje

(formerly Team System, VSTS)

Download files from TFS version control and set the file last access timestamp to the file’s last check-in time

March 14th, 2011 · 2 Comments · Team Foundation Version Control, Tools and Utilities

Often I hear the following questions about TFS version control:

  • Can I just download files or folders from TFS without having to create a workspace?
  • Can I specify that files do not have the read-only attribute set?
  • Can I configure that files show the last check-in time as last write time?
  • Can can I "export" files from TFS and remove the bindings to my TFS?

The answer is: Yes, you can!

Using tfsexport.exe:

Corrected the typo - Thanks, Matt!

A few notes on what the tool offers:

  • Files/Folders are downloaded from TFS without requiring a workspace.
  • There is no read-only flag set on the files exported.
  • Optionally sets the file time to the time of last check-in.
  • Optionally removes the source control bindings (from VS solution/project files).

Download the tool from here:

Prerequisite: This tool requires Team Explorer to be installed.

(Special thanks to Grant Holliday and Marcel de Vries)



2 Comments so far ↓

  • Grant

    If you just want to download a file without a workspace, you can also use: tf view /collection:http://server:8080/tfs/Collection1 $/folder/path/file.cs /outputfile:file.cs

    However, it won’t set the file time to the checked-in time, or remove source control bindings, like Neno’s tool does.

  • neno

    Right. I should make it more clear that the tool can actually export a whole folder at once (with removing bindings etc.)

Leave a Comment