tags:

views:

87

answers:

1

I'm using TFS and I'd like to be able to get all files that have label XYZ. The only way that I can see to do this is to do "Get Specific Version", Label, Browse the label, pick a file, hit Get. Repeat for every file. If I have 20 files to get then this will be tedious and error prone. Doing a get on the label name at a root level of the repository doesn't work, it won't find the files in the subdirectories. Someone told me that it works on his system though, so I'm not sure what the issue is.

Someone suggested labels as a solution to this problem: I'd like to be able to mark a set of files across multiple solutions as belonging to a group. I'd like to be able to get all of the files in the group at once and put them in a directory. Is this possible with TFS? The files in question are all SQL procs etc. so they don't really need to be part of a solution to run, they're just scripts. But they do belong together logically, since they'll all be run after a new database is added.

Update: I'm concluding that labels in TFS are broken or worthless. If someone would care to educate me, feel free. But I've blown enough time on them today to decide that they're not worth anymore of it.

+1  A: 

Just do the "Get Specific Version" with the label option from a folder, and it will apply recursively. From the command line, this looks like:

tf get * /r /version:Lyourlabelname

Jason Barile
doing that caused tfs to delete all the files I had retrieved from source control. Used: tf get /recursive /version:L"my label name". I'm not saying it didn't work, just didn't expect that. I suppose I could make a new workspace then use the command line get...
jcollum