1

In my case get latest version of some branch means download 50GB of data. There is a lot of resources inside but I need only sources.

If it possible to download only one specific type instead of all data?

Update: I ask about simple way . If solution harder than installing VS plugin or couple lines in powershell/python using tf.exe then I will download 50GB once and try to code solution with TFS API on weekend.

Stepan Loginov
  • 1,667
  • 4
  • 22
  • 49
  • 1
    Can't you go to source control explorer and select the node you want to get, right click and click on GetLatestVersion(Recursive) ? – Erick Boshoff Apr 21 '17 at 14:22
  • Do you use TFS or Git CVS? Are you hard files located in a separate catalog? If you need only some files you can use API for downloading required artifacts. https://www.visualstudio.com/en-us/docs/integrate/get-started/client-libraries/dotnet – Oxoron Apr 21 '17 at 14:29
  • @ThatAwesomeCoder I am not sure that I understand you correct. In my case sources located in many different folders. I think more than 100. Downloading each of it manually not easy work. – Stepan Loginov Apr 21 '17 at 14:38
  • @Oxoron now I use pure TFS via 2013 VS. I also know that tf.exe tool exist. But I don't see simple way how to script what I want. High level API is good direction, but it looks like download 50 GB once much faster – Stepan Loginov Apr 21 '17 at 14:39
  • 2
    The data is sparse or confined to a folder? In this latter case Cloak and you are good to go – Giulio Vian Apr 21 '17 at 15:57
  • Eduard's reply is great. Did you figure out your problem follow his suggestion? – PatrickLu-MSFT May 02 '17 at 10:01

1 Answers1

1

As already mentioned by @Giulio Vian you can cloak the paths you don't want to download before downloading.

Unfortunately you cannot cloak using wildcards, but you can use script approach in How do I cloak multiple folders at a time in Team Foundation Server? to cloak unneeded files.

In the script example shown in that answer you just need to come up with PowerShell "where" filter matching your case

Get-ChildItem | where {$_.PsIsContainer} | ForEach-Object { Write-Host $_.Name ; tf workfold /cloak $_.Name }

the details in the question is not provided to code exact filter. If you update your questions I can update this with "where" filter.

Community
  • 1
  • 1
Eduard
  • 897
  • 5
  • 11