6

Im having trouble creating a workspace and downloading the files from a Team Foundation Server using the Team Explorer Everywhere command line client (TEE-CLC-10.0.0). I've gotten as far as creating workspace:

$ ../tfs/TEE-CLC-10.0.0/tf -login:secretUsername,secretPassword -server:http://secretHost:8080 workspace -new KOLOBI
Workspace 'KOLOBI2' created.

Then I want to download files from the server to my workspace:

$ ../tfs/TEE-CLC-10.0.0/tf -login:secretUsername,secretPassword -server:http://secretHost:8080 get -recursive -all -force .
An argument error occurred: Items must reside in a workspace that has been previously used on this computer.

I guess I'm missing one step which is to add local directories to the workspace or something like that. But I can't figure out how to do it to be able to download the files.

Edward Thomson
  • 74,857
  • 14
  • 158
  • 187
Björn Lindqvist
  • 19,221
  • 20
  • 87
  • 122

1 Answers1

8

You'll need to create working folder mappings between your local folder and the server items you wish to correspond to.

For example:

tf workfold -map -login:secretUsername,secretPassword -server:http://secretHost:8080 -workspace:KOLOBI '$/TeamProject/Project' '/home/me/project'

Then from the /home/me/project directory (or whatever you pick), you can just execute tf get .

Edward Thomson
  • 74,857
  • 14
  • 158
  • 187
  • how would you do this in windows? I changed the home/me/project path to a windows directory but i get the message: workfold requires zero, one, or two path arguments – PAULDAWG May 17 '13 at 22:14
  • @PAULDAWG could you post your full command line? it sounds like you have a space somewhere that isn't being quoted. – Edward Thomson May 17 '13 at 22:26
  • tf workfold /map /login:secretusername@domain.com,secretPassword /server:http://serverurl:8080/tfs workspace:EEMXP01 '$/' 'C:\EEMTFS Source\' – PAULDAWG May 17 '13 at 22:40
  • I added a switch to workspace and now it says my workspace doesn't exist, so i guess im onto a different problem now – PAULDAWG May 17 '13 at 22:42
  • @I am trying to map the TFS workspace to local by using this comment tf workfold /map /login:username,pwd /server:http://servername:8080/tfs /workspace:'$/source/app/TFS_Label' 'C:\TFS_Label' but getting the error saying "An argument error occurred: workfold requires zero, one, or two path arguments." Please help on this issue..thanks. – Elango Mani Feb 04 '16 at 08:54
  • You are supplying a server path to the workspace argument. Please create a workspace, use that name for that argument (eg, `/workspace:NAME`) and then use the server path as a separate argument. – Edward Thomson Feb 04 '16 at 14:44