Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS command line to get all mapping information of a specific workspace

Tags:

tfs

I am trying get all maping information for a specific workspace.

When I try this command, it displays a dialog - which is not what I want.

tf workspace myworkspace 

Is there a command that will get all the working folder information and output to the console?

like image 520
icn Avatar asked Feb 02 '12 23:02

icn


2 Answers

The following command displays the working folder mappings for the workspace in the current directory:

C:\projects>tf workfold

If you want to list the working folder mappings for a different workspace, you can specify the /workspace:workspacename parameter.

C:\>tf workfold /workspace:My_Other_Workspace

You can manipulate the workspace mappings using this command also.

The following example maps the folder C:\DifferentWorkfold to the Team Foundation version control server folder $/projects/project_one

c:\projects>tf workfold $/projects/project_one C:\DifferentWorkfold

See Tf Command-Line Utility - Workfold Command on MSDN for more information

like image 122
Grant Holliday Avatar answered Nov 09 '22 09:11

Grant Holliday


In TFS 2008 and TFS 2010, the command

C:\projects>tf workfold

would indeed display the working folder mappings for the workspace in the current directory.

However, for TFS 2012, this command no longer works. Now, you just get an error message:

Unable to determine the workspace.  You may be able to correct this by 
running the command 'tf workspaces /collection:TeamProjectCollectionUrl'

If I knew the TeamProjectCollectionUrl then I wouldn't need to run the workfold command!

like image 40
Howard Avatar answered Nov 09 '22 09:11

Howard