0

I need to remove a specified file from all branches, how would I go about doing this? From what I read I would probably use the destroy command, but how would it work exactly?

There are too many files for me to check all of them out, delete and check back in. The file is always under something like folder1/folder2/thingToDelete.exe under all the branches.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Lings
  • 1
  • Cam you get the list of all branches programmatically, iterate over it, delete the the file, commit the changes? – abatishchev Mar 10 '15 at 00:53
  • How would you go about iterating the branches exactly? Im still pretty unfamiliar with tfs in general. – Lings Mar 10 '15 at 04:17
  • See http://stackoverflow.com/questions/4690217/how-to-programmatically-get-information-about-branches-in-tfs – abatishchev Mar 10 '15 at 04:18
  • For that to work, dont you need to actually check out the files? The main issue I have here is that there are way too many files for me to be checking out. (hundreds of branches, I need to get rid of a file in the same location for each branch) Maybe iterating over the branches and calling destroy each time? Is there a way to wild card query the file to delete? The file I need to get rid of is under branches(1-n)/folder1/folder2/thing.exe, how would I specify it in the destroy command? – Lings Mar 10 '15 at 17:52
  • I got it to work with iterating through the branches and deleting each, thanks! – Lings Mar 11 '15 at 01:15

0 Answers0