Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to delete all .svn files from a folder and all of its subfolders so I'm doing this from the command line:

del /s *.svn

However, all I get is this for each .svn file:

Access is denied.

How do I make sure I can delete all of the .svn files?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

I think what may be happening is that your del command isn't properly matching the ".svn" folder. I had the same problem and solved it using PowerShell like the following:

powershell.exe "Get-ChildItem .\foldername -include .svn -Recurse -Force | Remove-Item -Recurse -Force"

Using the above without the pipe to Remove-Item will show you the results without also deleting them.

share|improve this answer
add comment

You need to be a Administrator to do the following
Open up a command prompt window in the the directory that this folder (Quick way: shift+right click the current directory and click Open Command Prompt Here) then type takeown /f directory_name /r /d y where directory_name is the name of the directory with the *.svn files and then type icacls directory_name /grant administrators:F /t.

Now try deleting the files again, however you can also try del /f /s *.svn.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.