3
votes

I am trying to add a task to delete files with specific type from source folder and all the sub folders using delete task in Azure DevOps pipeline.

Delete task: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/delete-files?view=azure-devops doesn't seem to provide any information on the patterns.

I have tried following combinations but none of them worked. (.xyz) (.xyz) *.xyz *.xyz\

my expectation is to delete files with .xyz type from all the sub folders.

1
As a workaround I have started using powershell task and wrote custom script to handle this. - julin shah
Hi, Do you try Ben's solution? Does it work ? - Hugh Lin
If Ben's answer helps you solve the problem,you could Accept it as an Answer - Hugh Lin
Thank you for the link!!, I was not sure how to do that - julin shah

1 Answers

1
votes

Try setting:

**/*.xyz

As the Contents variable value.

The full range of pattern filters is described in the documentation here.