tfstfsbuildtfs-2017

TFS 2017 build Copy files from


In a build, we have Copy files from the task. The problem we have is the source folder itself is copied to the destination. We'd want the contents of the source folder to be copied to the destination folder, not the folder itself. Is there any way to do that?

I tried a wildcard but that doesn't work. It seems it needs a path itself. An issue of this could be that the source is named 'X' but the destination is named 'Y' (it was setup before this build and IIS is pointing to this folder). Can we have the source folder be renamed in the build maybe?


Solution

  • That would be name_of_sourcefolder\**\* for all files and subfolders of just name_of_sourcefolder\* for all files. This has to be set in the Contents part of the task.