tags:

views:

22

answers:

1

I'd like to get a batch of files from a directory by date except for one file. I'd like to then look at all the files and see that yes, files 1 to n are the old versions and file 0 is the new version.

The simplest way to do that, seems to me, is to get the files and have the local file's timestamp be the last checkin time of that file. However, I don't think that's possible in TFS without custom coding. Is there an easy way to do this?

A: 

In current version of TFS (including TFS 2010), the files timestamps are always the time that they were downloaded by doing the get.

Don't quite understand the reason behind what you are trying to do, but it sounds like the easiest thing would be for you to write a simple .NET class or powershell script that did what you needed using the VersionControl part of the TFS API. You'd be able to query last-check-in dates etc without even haveing to download the file in question - you'd just look at the changeset ID's of each file to see which is the newest.

Martin Woodward
I just tested this in TFS2008 and the filestamp was the time I got the file, not the time the file was last checked in. Is there a setting?
jcollum
No, it's not configurable.
Richard Berg
This is something that most SCM's can do, but apparently TFS can't. Sure seems like I need to write a lot of powershell scripts to get TFS to work like a normal source control.
jcollum