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

  • Home
  • SEARCH
  • 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 7913437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:50:39+00:00 2026-06-03T13:50:39+00:00

I would like to get the source code of a project at specific time

  • 0

I would like to get the source code of a project at specific time (changeset). So I need do download whole folder. I would like to do it for different times and handling a different workspace is not very convenient.

I know about TFS Get Specific Version into separate folder (with workspace) and Need command to get a file from TFS without a workspace (one file).

Is there some solution for whole folder without creating a new workspace?

Edit
I have found the accepted answer too ambitious. I needed something more simple.

Assumptions:

  • I can access TFS from Visual Studio on my computer
  • I want to get the ChangeSetNumber Changeset from the folder
    DesiredFolder in TFS project tProj

I run the following batch from a destination folder in Visual Studio Command Prompt

set workspace_name=TemporaryWorkspace%username%
set changeset= ChangeSetNumber                
tf workspace -new %workspace_name% -noprompt
tf workfold -map $/tProj . -workspace:%workspace_name%
tf get $/tProj/DesiredFolder -version:C%changeset% -recursive -noprompt
tf workfold -unmap . -workspace:%workspace_name%
tf workspace -delete %workspace_name% -noprompt

It is necessary to confirm remove source control association when starting the downloaded solution.

Edit 2023
I wanted to use the script but I was getting the following error:

Unable to determine the workspace.

I managed to find a solution in SO:Unable to determine the workspace using TF.exe. And from it I have a corrected script:

set workspace_name=TemporaryWorkspace%username%
set changeset=ChangeSetNumber
tf workspace -new %workspace_name% -noprompt /collection:<team-project-collection-url>
tf workfold -map $/ . -workspace:%workspace_name%
tf get $/tProj/DesiredFolder -version:C%changeset% -recursive -noprompt
tf workfold -unmap . -workspace:%workspace_name%
tf workspace -delete %workspace_name% -noprompt

Where <team-project-collection-url> is the URL of the project collection that contains the workspace that you want to create, for example, https://myserver:8080/tfs/DefaultCollection.

Probably something has changed during past five or six versions of Visual Studio

  • 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-03T13:50:40+00:00Added an answer on June 3, 2026 at 1:50 pm

    I use this syntax for temporary workspaces:

    tf workspace -new %JOB_NAME%;%user% -noprompt -server:http://%host%:8080/tfs/%project% -login:%user%,%password%
    tf workfold -map $/Release/MilestoneX.X . -workspace:%JOB_NAME% -server:http://%host%:8080/tfs/%project% -login:%user%,%password%
    tf get . -version:L%TFS_LABEL% -recursive -noprompt -login:%user%,%password%
    tf workfold -unmap . -workspace:%JOB_NAME% -login:%user%,%password%
    tf workspace -delete %JOB_NAME%;%user% -noprompt -server:http://%host%:8080/tfs/%project% -login:%user%,%password%
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to get the XAML source of a WPF Window (MainWindow). Clicking
I would like to use java to get the source of a website (secure)
I would like to get data from from different webpages such as addresses of
I'd like to get some code editing for a free software project done during
I would like to create class diagram from existing source code using rational rose.
Would like to get a list of advantages and disadvantages of using Stored Procedures.
I would like to get the id of a class that is created in
I would like to get the coordinates of an object in OpenGL. I draw
I would like to get data about ink, free pages (paper) etc from the
I would like to get up-to-date information on Google's index of a website, and

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.