Reputation: 1591
I'm trying to grab a project from TFS from the command line. I have its location on the server (starts with $/
) and a directory I want to put it in.
I navigate to that directory, type tf workspace /new /s:<servername>
, and enter a workspace name.
Next I type tf get /force /recursive /version:W<workspacename>
, it returns 'All files are up to date', however it hasn't downloaded anything.
Also, I'd like to download the project into the workspace directory and then <projectname>
, currently it makes a bunch of folders (based on $/the/long/path/to/the/<projectname>
on the server).
Is there a way I can do that or do I need to move it after I'm done?
Upvotes: 4
Views: 5304
Reputation: 23157
You also have to map the folders. Take a look at tf workfold
tf workfold /map:"$/ServerFolder/Path/To/Map","C:\LocalFolder\Path" /workspace:WorkspaceName /server:http://tfs:8080
Substitute anything in that command line that follows a colon into the correct value for your environment.
Also, you can map at any level that you want. For instance, you could map $/Project/Folder/Project1/Source
to C:\TFSSource\Project1
Upvotes: 7