Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder that contains files I have compiled in .NET (however this question could easily apply to a non-programmer's folder too, e.g. containing word documents or whatever.)

When I try to clear it out using the Command Prompt:

del /F /S *

Then I get an "Access is Denied" on a certain file. This is definitely not due to security so it must be a lock.

However when I use Cygwin I am able to delete it:

$ rm -r *

So what is Cygwin doing that is special. Can I emulate this some how from the regular command prompt?

By the way this happens enough times 100+ so that it isn't a fluke that the file got unlocked before I opened Cygwin. Definitely Cygwin is able to unlock it somehow but regular Command Prompt cannot do it.

share|improve this question
It could be due to security. Are you running the Windows command prompt as administrator? That might be significant, depending on the files you are trying to delete. – toryan Jan 8 '14 at 0:28
Yes running Windows command prompt as admin. Would be interesting to know what cygwin does differently under the bonnet. Maybe it goes in at a lower level to delete the file. – Martin Capodici Jan 28 '14 at 2:53

Your Answer


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

Browse other questions tagged or ask your own question.