How to copy specific file from one directory to another directory in same repository in Azure DevOps

sachin gupta 376 Reputation points
2022-10-17T16:07:41.32+00:00

I am moving specific file (e.g. 5 json file) from one directory to another directory in same repository. I was able to extract the file and published to Devops successfully, but those specific file didn't upload to main root directory of Azure Devops where all other files are present.

Steps performed-

  1. Download specific file from old repository as a zip folder on local machine.
  2. Then upload the same zip file to new Azure Devops repository where I want to copy those file. PFA,Screenshot 1. Created a pipeline which includes the following task activity:
  • 251137-1-zip-file.jpg251191-2-published-extracted-artifacts.jpg251173-3-target-root-devops-repository-path.jpgUsed the extract Files in built task and used the same zip file in archive file pattern and destination folder - $(BuildSourceDirectory)
  • Copy all the extracted files from $(BuildSourceDirectory) to $(BuildArtifactStagingDirectory).
  • Publish artifacts from $(BuildArtifactStagingDirectory) to 'azure pipeline' artifact publish location. Till this point, artifact has been generated and published successfully and I can see specific file extracted there (e.g. 5 file). PFA, Screenshot 2.
    PFA, Screenshot 3 where I want to copy a specific file.

source (zip file)= main root directory of Azure Devops Repository XX

Target = main root directory of Azure Devops Repository XX

Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-10-17T17:13:35.96+00:00

    Devops / TFS is not currently supported here on Q&A. The product group for Azure DevOps / TFS actively monitors questions over at
    https://developercommunity.visualstudio.com/report?space=21&entry=problem
    https://developercommunity.visualstudio.com/report?space=22&entry=problem
    https://azure.microsoft.com/en-in/support/devops/

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.