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

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)

–Neno

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

  1. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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>