locked
Copy files - Relative path or use Variable? RRS feed

  • Question

  • Hello,

    I've recently been attempting to create a build configuration that will copy the output directory of a build step from the Build agent machine to a target machine. I'd like to make this occur using variables if possible, or at least a relative path.

    However when you hover over the "Source Path" property of a copy files step in Build 2015, it states it must be an absolute path or UNC share.  Can this be changed eventually to include relative paths or at least accept a variable?  When I put in a variable it states the input string was in an incorrect format.

    Friday, September 18, 2015 7:38 PM

Answers

  • hi William

    look at Powershell script step - it is much more flexible and you can use variables


    Please use Mark as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    Friday, September 18, 2015 8:09 PM

All replies

  • hi William

    look at Powershell script step - it is much more flexible and you can use variables


    Please use Mark as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    Friday, September 18, 2015 8:09 PM
  • I agree PowerShell seems to be the way to go, just seems like this would be a very nice enhancement in the future. I'm not sure requiring PS knowledge for such a simple task is a good policy. (It even appears to be creating a PS file on the fly anyways, why not include some pass through options?)

    Thanks Daniel.

    Friday, September 18, 2015 9:05 PM
  • Hi William,

    Thanks for your post.

    We can copy use the CopyDirectory activity, but we need provide the UNC path in it, cannot use the relative path.

    Or create PowerShell script to bat script to perform the copy, then run script during Team Build.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Monday, September 21, 2015 6:36 AM
    Moderator