locked
TFS command to retrieve local item path RRS feed

  • Question

  • Hi,

          What is the command to retrieve Local Path for a server item in TFS?

    Regards,
    MAC.

    Tuesday, March 10, 2009 10:06 AM

Answers

  • tf workfold $/michal1/1/fabio

    ================================================================
    Workspace: MICHALMAROS1_1 (michalma)
    Server   : http://xxxx:8080
     $/michal1/1/fabio: E:\trash\ws2_michalarch1atdt\fabio

    This does direct translation using workspace mappings. If you have pending renames and want to take them into account, I think tf properties are the only answer (it makes a few server calls):
    tf properties $/michal1/1/2

    Local information:
      Local path : E:\trash\ws2_michalarch1atdt\2
      Server path: $/michal1/1/2
      Changeset  : 9
      Change     : none
      Type       : file
    Server information:
      Server path  : $/michal1/1/2
      Changeset    : 9
      Deletion ID  : 0
      Lock         : none
      Lock owner   :
      Last modified: Thursday, March 05, 2009 9:19:12 AM
      Type         : file
      File type    : Windows-1252
      Size         : 13

    Hope this helps
    Michal Malecki
    Tuesday, March 10, 2009 1:29 PM

All replies

  • tf workfold $/michal1/1/fabio

    ================================================================
    Workspace: MICHALMAROS1_1 (michalma)
    Server   : http://xxxx:8080
     $/michal1/1/fabio: E:\trash\ws2_michalarch1atdt\fabio

    This does direct translation using workspace mappings. If you have pending renames and want to take them into account, I think tf properties are the only answer (it makes a few server calls):
    tf properties $/michal1/1/2

    Local information:
      Local path : E:\trash\ws2_michalarch1atdt\2
      Server path: $/michal1/1/2
      Changeset  : 9
      Change     : none
      Type       : file
    Server information:
      Server path  : $/michal1/1/2
      Changeset    : 9
      Deletion ID  : 0
      Lock         : none
      Lock owner   :
      Last modified: Thursday, March 05, 2009 9:19:12 AM
      Type         : file
      File type    : Windows-1252
      Size         : 13

    Hope this helps
    Michal Malecki
    Tuesday, March 10, 2009 1:29 PM
  • If you want to see just the local path, you can run tf properties and pipe the output to find searching for that line that contains "Local path":

    tf prop $/Proj/file.cs | find "Local path"
    Tuesday, March 10, 2009 2:25 PM
    Moderator