Unable to determine the workspace
-
Monday, July 31, 2006 5:23 PM
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,j1tf workfold /s:s1 /workspace:ws1 /unmap $/
tf workfold /server:s1 /workspace:ws1 /map $/x/y/z/customer/9 C:\TFSGettf get /recursive /noprompt
echo getting files
echo finished
All Replies
-
Tuesday, August 01, 2006 3:53 PMwhere are you executing the bat file from? Are you on a drive other than C?
-
Wednesday, August 02, 2006 3:46 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
-
Friday, August 04, 2006 3:34 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:43 PMModerator
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,j1tf workfold /s:s1 /workspace:ws1 /unmap $/
tf workfold /server:s1 /workspace:ws1 /map $/x/y/z/customer/9 C:\TFSGetpushd C:\TFSGet
tf get /recursive /noprompt
echo getting files
echo finishedThis should do the trick.
-Aaron
-
Monday, August 07, 2006 8:41 PM
Working fine....
Thanks
AJS

