Determining location of local copy of TFS files? RRS feed

  • Question

  • How can I programmatically determine the location of a particular TFS project on my local PC?

    A script needs this info, and I know it varies for different users because the TFS configuration is not uniform across users.

    For example, on my PC a TFS project "MyProject" might have local files under C:\TFS\Proj\MyProject,

    ...but for another user it might be C:\TFS\MyProject.

    Looking for a way to determine the location in a script...any pointers appreciated!



    PS: Sorry if this is a duplicate, was having issues posting.

    Monday, July 3, 2017 7:36 PM

All replies

  • How can I programmatically determine the local workspace location where a particular TFS project ($/MyProject) is situated?

    It seems the TFS installation/configuration varies from user to user where I am.

    Some might be at C:\TFS\Proj\MyProject

    Others might be at C:\TFS\MyProject


    I need to determine the actual location programmatically for the current user and PC.

     Is this readily possible?
    Monday, July 3, 2017 2:20 PM
  • Hi,

    You need to use the Getworkspace method to get the workspace, then you could get the mapping path, please refer to this thread:


    Best Regards

    Limitxiao Gao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, July 11, 2017 8:49 AM