0

Is there any easy command to delete all the files that are called asd.xsd from repository recursively from SVN repository.

It is annoying to go inside each folder right click and select tortoise svn delete command.

There must a be a command to look for the all files named asd.xsd and delete them from repository.

bahrep
  • 29,961
  • 12
  • 103
  • 150
akd
  • 6,538
  • 16
  • 70
  • 112
  • Check this thread: http://stackoverflow.com/questions/2647337/svn-delete-with-wildcard There are solutions for both TortoiseSVN and PowerShell. – Ivan Jovović Apr 07 '15 at 09:25

1 Answers1

2

You could use Get-ChildItem -Recurse:

foreach($FilePath in (Get-ChildItem -Path "C:\svn\repo" -Include "asd.xsd" -Recurse |Select-Object -ExpandProperty "FullName")){
    svn del $FilePath
}

The FullName property contains the path to the file in question

Mathias R. Jessen
  • 157,619
  • 12
  • 148
  • 206
  • Do I need to replace the FullName with the path of asd.xsd file? – akd Apr 08 '15 at 09:15
  • No, since we pipe the files found to `Select-Object -ExpandProperty "FullName"`, the `$FilePath` variable now contains the FullName/Path in question - only thing you need to do is replace `"C:\svn\repo"` with the path to your actual svn working directory – Mathias R. Jessen Apr 08 '15 at 09:38