Rename (Move) command:

Get-TfsChildItem $/ProjectA |
    select -Skip 1 |  # skip the root dir
    foreach {
        tf rename $_.serveritem $_.serveritem.replace("$/ProjectA", "$/ProjectB")
    }

 

History command:

  • tf history $/ProjectA/somefile.cs;1234 where changeset 1234 was before the move
  • tf history $/ProjectB/somefile.cs;5678 where changeset 5678 was after the move. Or you could just omit the version.

 

http://stackoverflow.com/questions/2215593/team-foundation-server-moving-source-with-history/2215706#2215706

Advertisements