3

I need to bulk-check-out of all our .html files. (to do a masse edit-replace from the command-line, and check them all back).

This is just a one time thing. I see a lot of threads on how to exclude files types but at project inception and definition level, like

Team => Team Project Collection Settings => Source Control File Types

or for TFS 2012 the .tfignore file.

But..

1) This seems to be for permanent exclusion at the project level. I don't want to touch the overall Source Control settings, colleagues work with all these other files types I need excluded.

2) These filters are all defined by what you exclude. But it would be much easier in that case, to define what you want to include (here .html files), so in essence, to say include 'A', instead of having to say exclude 'B', exclude 'C', exclude '...' going after the whole alphabet.

Thank you

Zoe
  • 27,060
  • 21
  • 118
  • 148
  • Why do you need to exclude files to do a bulk checkout? – stuartd Jan 28 '14 at 10:16
  • It's because getting all the .PDF .DOCX .MP4 and more by the thousands would be consuming huge resources both in disk space and processing time, all this completely uselessly. I was implying a bulk-GET before the checkout. Your command-line tf get *.html /recursive is right on the money, thanks much! – Antoine Maréchal Jan 28 '14 at 19:54

2 Answers2

3

For a bulk checkout, you can use tf checkout.

Open a command prompt with the current path within your local workspace and issue this command to check out all .html files:

tf checkout *.html /recursive

If you want to limit the checkout to part of the source tree, specify that in the itemspec:

tf checkout $ProjectCollection/Trunk/Project/*.html /recursive
stuartd
  • 70,509
  • 14
  • 132
  • 163
  • Fantastic. I had spent quite a bit of time researching. – Antoine Maréchal Jan 28 '14 at 19:32
  • (preceding comment submitted under my feet before finished..) I'm specifying the whole absolute path, because even though I cd-ed in the directory, it looks as if I never did, including the prompt still displaying the initial: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC> It was erroneously claiming "All files are up to date." http://stackoverflow.com/questions/4649290/tfs-get-command-erroneously-returns-all-files-are-up-to-date It's running as we speak. Thanks a lot.. – Antoine Maréchal Jan 28 '14 at 19:41
1

If you are using TFS 2012 or newer, just make sure you are using a local workspace and you don't need to explicitly check-out anything. TFS will automatically detect local changes and put them in the Pending Changes list.

So just run your tool locally to go and bulk change all the html files. Then fire up VS and look in the Pending Changes window, all changed files should be listed and can be checked in.

Dylan Smith
  • 22,069
  • 2
  • 47
  • 62
  • Oh wow.. a good reason to upgrade (from our TFS 2010). Yes a local workspace, now I just realize that I should have included the bulk-GET in my question. – Antoine Maréchal Jan 28 '14 at 19:49