First of all, this article comes from the http://www.dnzone.com/go of this three brother? 2357
After trying for a day, I was not successful. I had a lot of detours. Finally, I went back and saw this story by my brother a and I was absolutely no problem,
I did not try it on a machine with TFs installed in the afternoon, then, the tf.exe file was not copied to the same folder as BAT, resulting in a basic error where the command could not be found.
In short, today I have wasted a lot of time on this task, but it also shows that I am not calm enough. If I calm down at work and take a closer look at the cause of the error, I am not afraid of such things that I have never done before,
It should not take so much time to hone your skills in the future.
Echo on
@ Echo on
Set getpath = "E: \ getcode"
Set tfspath = "$/moneyrecord/testdataannotation"
Set workspacename = "publiczone"
Set tfsserver = "http: // zbomb-PC: 8080/TFS/defaultcollection"
Rem pushd D: \ Program Files \ Microsoft Visual Studio 10.0 \ common7 \ ide
Echo.
If not exist % getpath % MD % getpath %
TF workspace/Delete % workspacename %/noprompt/S: % tfsserver %
TF workspace/New/S: % tfsserver % workspacename %/noprompt
TF workfold/S: % tfsserver %/workspace: % workspacename %/unmap $/
TF workfold/Server: % tfsserver %/workspace: % workspacename %/map % tfspath % getpath %
Pushd % getpath %
TF get % tfspath %/recursive/noprompt
Echo.
Popd
Echo TFs get completed...
Save the bat name and copy tf.exe to download the code using the command line. This workspace is a public workspace.