10
We have a batch script that removes files (del) and directories (rd). Does anyone know how to halt (fail) execution of the script if any of these delete statements fail? They could fail if a file/directory is locked by Windows. Thanks.
Update
Statements I'm using:
Del: del *.* /S /Q
RD: FOR /D %%G in (*) DO RD /s /q %%G