To create shelvestet from set of files I use following command:

tf shelve /comment:myComment myShelveName /recursive 
/noprompt /replace /move "firstFile" "secondFile" ... "lastFile"

If all of the "firstFile, .. lastFile" are checked out then command succeeds - if any of them is not checked out then command fails.

Solution to avoid such failure is to checkout all the listed files regardless to whether they are changed or not. Another option would be to filter the names of the somehow. And you may find out more.

But, in general, is there some option to successfully use tf shelve on set of files where only some of them are checked out?

1 Answer 1


No, there is no way to shelve files you have not first marked as changed. If you need such a feature frequently, you could write a batch script to first execute tf edit then tf shelve.

  • Actually this is what I'm doing..but I was looking for some way to optimize a bit.. Commented Aug 17, 2012 at 12:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .