Unable to delete a file or take ownership on Win7x64

I had this issue too for a file I manage with SourceTree ( git client ). This file had no 'Owner'. I just noticed that closing down all application susceptible to use it, removed it magically. The other option was to remove the file in windows' safe-mode. I don't know why this happened though and I'm curious too as to why this happened.


One solution works for me on Windows 7 :

Right click the hard disk drive, ==> Properties / Tools / Check now .... And then try to delete again, it should work.