Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
999 views
in Technique[技术] by (71.8m points)

file - Command line tool to delete folder with a specified name recursively in Windows?

I want to delete every "_svn" in every folder and subfolder...

For example

c:
  proyect1
   _svn
   images
     _svn
     banner
       _svn
     buttons
       _svn

Then I run something like

rm-recurse c:proyect1 _svn

And I should get:

c:
  proyect1
   images
     banner
     buttons

The ideal thing would be a tiny stand-alone EXE or something like that.

-- Thanks Grant, as soon as I posted the question I saw SVN documentation about the SVN export command, but I also want to delete the _vti_* folders stuff Visual Studio creates, so I'll also explore the for solution.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Similar to BlackTigerX's "for", I was going to suggest

for /d /r . %d in (_svn) do @if exist "%d" rd /s/q "%d"


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...