none
Unable to determine the workspace

    Question

  • I am executing the below command line implementation as .bat file. I am getting "Unable to determine the workspace" while getting the latest version.


    IF NOT EXIST C:\TFSGet MD C:\TFSGet
    tf workspace /delete ws1 /noprompt /s:s1 /login:j,j1
    tf workspace /new /s:s1 ws1 /noprompt /login:j,j1

    tf workfold /s:s1 /workspace:ws1 /unmap $/
    tf workfold /server:s1 /workspace:ws1 /map $/x/y/z/customer/9 C:\TFSGet 

    tf get /recursive /noprompt
    echo getting files
    echo finished

    Monday, July 31, 2006 5:23 PM

Answers

  • Try:

    IF NOT EXIST C:\TFSGet MD C:\TFSGet
    tf workspace /delete ws1 /noprompt /s:s1 /login:j,j1
    tf workspace /new /s:s1 ws1 /noprompt /login:j,j1

    tf workfold /s:s1 /workspace:ws1 /unmap $/
    tf workfold /server:s1 /workspace:ws1 /map $/x/y/z/customer/9 C:\TFSGet 

    pushd C:\TFSGet

    tf get /recursive /noprompt
    echo getting files
    echo finished

    This should do the trick. 

    -Aaron

    Friday, August 04, 2006 3:43 PM

All replies

  • where are you executing the bat file from? Are you on a drive other than C?
    Tuesday, August 01, 2006 3:53 PM
  • The 'get' command in tf.exe attempts to automatically determine the workspace which it should operate on. For this to work correctly there can only be one workspace with a local path mapped at or below the directory in which the get is performed. So you have two possible solutions to your problem:

    1. Make sure there is only one workspace with a mapping anywhere on the C: drive

    2. (The more appropriate solution) Have your script perform a 'cd c:\tfsget' before performing the get.

    Let me know if this doesn't work out for you.

    Patrick

    Wednesday, August 02, 2006 3:46 PM
  • Yes, I am using more than one workspace in my system. The first one is default workspace and the another one i am creating through script.

    OK... Please let me know solution for handling more that one workspace?

    AJS

     

    Friday, August 04, 2006 3:34 PM
  • Try:

    IF NOT EXIST C:\TFSGet MD C:\TFSGet
    tf workspace /delete ws1 /noprompt /s:s1 /login:j,j1
    tf workspace /new /s:s1 ws1 /noprompt /login:j,j1

    tf workfold /s:s1 /workspace:ws1 /unmap $/
    tf workfold /server:s1 /workspace:ws1 /map $/x/y/z/customer/9 C:\TFSGet 

    pushd C:\TFSGet

    tf get /recursive /noprompt
    echo getting files
    echo finished

    This should do the trick. 

    -Aaron

    Friday, August 04, 2006 3:43 PM
  • Working fine....

    Thanks

    AJS

     

    Monday, August 07, 2006 8:41 PM