Before you can add an item to source control, you must set up a local workspace and establish working folder mappings. For more information about getting started, see Walkthrough: Working with Team Foundation Source Control from Command Line.
Add is a Pending Changes command; it schedules the items that you specify for addition to the Team Foundation source control server pending the completion of a check-in operation from your workspace. To perform a pending change command, your current directory must be mapped to a workspace and the Team Foundation source control server to which it corresponds.
When you use the Add command to add a new item to source control, the item is not actually added to the Team Foundation source control server until you check in your most recent workspace changes. Instead, the item is added to the list of pending changes for the current workspace. To commit the pending addition to the Team Foundation source control server, you can either check in the added file directly, or check in all pending changes in the local workspace. If you are concerned that another user might add a file or folder of the same name as one of your pending additions to the Team Foundation source control server before you have a chance to check in your pending changes, you can include the /lock option to reserve the namespace and prevent them from doing this. For more information, see How to: Check In Pending Changes.
If you add 314.cs to source control using tf add $/teamproject/projects/math/314.cs, each of these folders is considered a pending addition if they do not already exist, until you check in your changes. When you do, if any of the folders in the specified path ($/teamproject, $/teamproject/projects, or $/teamproject/projects/math) do not already exist in the Team Foundation source control server, Team Foundation creates them for you.
You can use the Add command to establish the initial file structure of a Team Foundation source control server. For more information, see Walkthrough: Working with Team Foundation Source Control from Command Line.