<p>I have been googling for a good time on how to move a file with c# using the TFS API. The idea is to have a folder on which the developers drop database upgrade scripts and the build process get's to the folder creates a build script and moves all the files on the folder to a new folder with the database build version that we just created. </p>

<p>I cannot seriously find any reference about moving files programatically in TFS... (aside of the cmd command line) </p>

<p>does anybody know of a good guide / msdn starting point for learning TFS source control files manipulation via c#? </p>

Its pretty simple :).
```
```
Microsoft.TeamFoundation.VersionControl.Client.Workspace workspace = GetMyTfsWorkspace();
workspace.PendRename( oldPath, newPath );
```
```
Then you need CheckIn it of course. Use a "workspace.GetPendingChanges()" and "workspace.CheckIn()" methods to do it.