Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8211383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:24:37+00:00 2026-06-07T10:24:37+00:00

After we branch for release, there are certain configuration files that need to be

  • 0

After we branch for release, there are certain configuration files that need to be updated. Currently, I’m getting latest version of all the source code on the specific (new) branch. This is time consuming and takes up a lot of disk space.

Is there a way to search/loop through the particular branch and only getting files that match a certain criteria?

E.g:

Loop through files under branch on the TFS server
If file name matches "foo.proj" or file name matches "foo.ini" 
Get latest version of the file

The “get” part is easy using the command line interface to TF (tf get $/project/foo.proj). I’m not to sure how to loop through the server objects without getting latest version first.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T10:24:39+00:00Added an answer on June 7, 2026 at 10:24 am

    I used this in the end:

    Custom install the TFS Powershell snap in using the tftp.exe that you download.

    Add the snap in:

    if ( (Get-PSSnapin -Name Microsoft.TeamFoundation.PowerShell -ErrorAction SilentlyContinue) -eq $null )
    {
        Add-PSSnapin Microsoft.TeamFoundation.PowerShell
    }
    

    Powershell script:

    param( [string] $ServerBranchLocation )
    
    $tfs=Get-TfsServer -name http://mytfsserver:8080/tfs
    $TfExePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe"
    
    $matchFoo = "foofile.foo"
    
    foreach ($item in Get-TfsChildItem $ServerBranchLocation -r -server $tfs) 
    { 
        if ($item -match $matchFoo)
        { & "$TFExePath" get $item.ServerItem /force /noprompt }
    }
    

    I couldn’t find a way to get the latest version using the snap in, so I had to use the ol’ trusty tf.exe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way in which after i update my branch to the revision
We currently use Subversion for our release management, and tag all of our releases
Being that the svn boook recommends deleting a branch after merging it into the
Do I need to explicitly close a branch after merging it into trunk? Or
After completing a feature branch, during a git rebase -i I accidentally removed all
The issue is that after your delete and push branch it isn't lost forever
Just after a release version we usually switch to Main codeline and work on
After merging a branch back to the trunk what do most people do with
After checking out a branch in a repository git always prints a list of
After following the RoR getting started tutorial, I added another model as: $ rails

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.