By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Can't delete files...

This is only peripherally a TCC question but I am trying to delete 1,384 files and am getting an "Access is denied" error message on all of them. This is a delete where all of the files have had the "R" (as well as "H" and "S") attribute stripped off (i.e., none of them is read only, hidden, or system) and the delete is being done in an administrative TCC session (since the delete is being done in a "for" loop I can not repeat the test in cmd.exe and see if I get the same result). What could possibly be going on here?
Turns out I can't delete them in cmd.exe either. What could possibly be going on here (again administrative prompt; files do not have any of read-only, system, or hidden attributes set)?
The only problem is that these are completely ordinary mp3 files that are duplicates that I'm trying to get rid of to clean up my hard drive. But your suggestion gives me a good idea: logon to the true Windows 7 Administrator account (which I have recovered) and see if I can delete them there.
It's possible that windows thinks the files are "in use", that is another application still has a handle open on them, although it seems unlikely for so many files. Is the FOR loop reporting "Access Denied" 1384 times, or does it just report it once then quit?

Try deleting just one file from a Windows Explorer and see if it works. If it doesn't we know it's unrelated to TCC. Your best option is probably to restart windows and try again.
Are the files left over from a previous version of Windows? They may have confused or overly-protective security. I have had to "take ownership" of such things in the past; often Explorer prompts for change of ownership. For any one of them, you can see the permissions ... r-click, Properties, Security, ...
There is also DEL /B, which should mark the files for deletion at the next reboot.
The "for" loop is reporting "In Use" a large number of times (I don't know for sure that it's 1,384 of them but that's probably where I got the count of them); the files were copied from the hard drive of my old machine that died but also ran Windows 7 and was up-to-date; and thank you for telling me about "Del /B" Charles, I was not aware of that option.

And I apologize for not responding sooner; I just gave up on it and worked on other things.

Similar threads