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 8091597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:06:04+00:00 2026-06-05T20:06:04+00:00

I am using a batch script for getting the latest version of specific projects.

  • 0

I am using a batch script for getting the latest version of specific projects. This script only runs tf.exe and gets the latest version of some Binaries. Everything works fine, but I would like to change the attrib of the downloaded files to be writeable (by deafult these files are read-only). For that I want to determine the local path of the files and use the attrib-command from batch.

tf.exe workfold [Workspace] shows me the local path in some kind of listing but it would be easier, if it only shows me what I want so I can use the prompt. Until now the it looks like this:

tf.exe workfold [Workspace]

=======================================

Arbeitsbereich: XYZ-xxxxxx (Username)

Auflistung: TFS-URL

[Workspace]:  C:\xxx\TFS\xxx

Is it possible to determine only the local path mapping of a TFS Workspace so that I can use the prompt for the attrib-command without parsing?

  • 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-05T20:06:05+00:00Added an answer on June 5, 2026 at 8:06 pm

    What about the following (crude!!!) concept?

    function Get-TfsWorkfold([string]$TfsCollection, [string]$TfsWorkspace)
    {
        $TfExePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe"
        Write-Output "Getting workfold for '$TfsCollection'->'$TfsWorkspace'..."
        Push-Location $LocalPath
        & "$TfExePath" workfold /collection:$TfsCollection /workspace:$TfsWorkspace
    }
    
    function Handle-Path()
    {
        param([Parameter(ValueFromPipeline=$true,Position=0)] [string] $line)
        $startIndex = $line.IndexOf(': ') + 2;
        $correctedLine = $line.subString($startIndex, $line.length - $startIndex - 1);
        Write-Output $correctedLine;
        Get-ChildItem $correctedLine
    }
    
    Get-TfsWorkfold "{serverAndcollection}"  "{workspace}" > c:\temp\test.txt
    Select-String c:\temp\test.txt -pattern:': ' | Select-Object Line | Handle-Path
    

    The last line in Handle-Path is the example which you can rewirte with whatever you want to. It is PowerShell but it should work as you want.

    Replace {serverAndcollection} and {workspace}.

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

Sidebar

Related Questions

I've created a batch script to automatically update some files using wget for Windows.
I'm currently using some configuration files from several project modules inside batch script(scriptx.sh) which
I've put together a batch script to generate panoramas using the command line tools
I have a batch file containing a python script using the Output template> %(NAME)s
i am using vbscript to call a batch file. my script looks like: dim
i am trying to delete some files using a batch file.. (winxp) my problem
I am trying to run a script ( MouseParty.pie ) using Glovepie . This
I am using the date command for a batch script. I am wondering how
Using a batch script (.bat file) in windows xp, how would I go about
I want to make a simple batch script using python using os.system. I am

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.