[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Microsoft, Team Foundation Source Control, Command Line get command

Posted on 2007-11-14
2
Medium Priority
?
990 Views
Last Modified: 2013-11-26
I need to have a batch file (or equivalent) which would retrieve a particular directory from my TFS to a specific location on my PC.

(A)
I tried to use the "get" command from the command line as below:
TF get $/myProject/Assets/UseCase /version:T /overwrite /recursive /noprompt

but got the error
Unable to determine the workspace.
(B)
I then tried
runas /noprofile /user:MYDOMAIN\user cmd

this prompted me for my password
I then entered the password and the cmd window was launched
I navigated to "D:\Program Files\Microsoft Visual Studio 8\Common7\IDE>" (Installed in D drive) and tried
TF get $/myProject/Assets/UseCase /version:T /overwrite /recursive /noprompt

but got the error
Unable to determine the workspace.

Regards
Koshy75
0
Comment
Question by:koshy75
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 30

Accepted Solution

by:
SteveGTR earned 1200 total points
ID: 20284254
I can't say specifically what the problem is, but a search on google finds a number of hits that might prove helpful:

http://www.google.com/search?q=%22Unable+to+determine+the+workspace%22+TF+get
0
 

Author Comment

by:koshy75
ID: 20333234
I needed to have a batch file which would retrieve a particular directory from my TFS to a specific location on my PC.
One main point which I missed out was that the "tf get" option would work only if launched from the mapped directory (which SteveGTR pointed out to me)

This is what I eventually did:
=====================================================================
Team Explorer (TFS) installed on D drive.
The path of tf.exe: "D:\Program Files\Microsoft Visual Studio 8\Common7\IDE\tf.exe"

Source control folder: "$/myProject"
Specific section of source control sub-folder to be retreived by the batch file: "$/myProject/Assets/Flow Diagrams"

Mapped local folder: "C:\My Files"
Destination path: "C:\My Files\Assets\Flow Diagrams"

1. First navigate to the mapped local folder
      e.g. cd "c:\My Files\Assets\Flow Diagrams"
2. Execute tf.exe with the following options
      "D:\Program Files\Microsoft Visual Studio 8\Common7\IDE\tf.exe" get "$/myProject/Assets/Flow Diagrams" /all /recursive /noprompt

Note:
There are multiple other options for "tf get" which you could choose based on your requirements.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question