Ignore errors on delete

P

peaton

I have been deleting large amount of files, on W2K server NTFS volume.

It was a very lengthy process from the command line running 'del *.* /s
/f /q' many many many times, as i was having to fix problems with deep
paths, permissions (used subinacl ) etc

each time i would fix the error and rerun DEL until it stopped at the
next error.

What is the best way to force deletion of all files?

or can I run DEL (or an alternative tool) to ignore the errors, delete
what it can in one go, then I can concentrate on fixing what is left.

Thanks in advance
Paul
 
J

Jerold Schulman

I have been deleting large amount of files, on W2K server NTFS volume.

It was a very lengthy process from the command line running 'del *.* /s
/f /q' many many many times, as i was having to fix problems with deep
paths, permissions (used subinacl ) etc

each time i would fix the error and rerun DEL until it stopped at the
next error.

What is the best way to force deletion of all files?

or can I run DEL (or an alternative tool) to ignore the errors, delete
what it can in one go, then I can concentrate on fixing what is left.

Thanks in advance
Paul

for /f "Tokens=*" %a in ('dir /s /b /a /a-d') do del /f /q "%a"

Should delete everything that is deletable.

If you schedule that with the AT command to run 2 minutes from now,
it will run in the system account context, which should delete them all.



Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top