If you just want errors from each line add 2>c:\errors.txt or similar to each line... you can also do it for all lines with:
@echo off
del c:\errors.txt 2>NUL
2>c:\errors.txt (
del .... /S /Y
del .... /s /Y
etc.
)
if exist errors.txt (
echo There were errors
notepad c:\errors.txt
pause
)
Steve
Main Topics
Browse All Topics





by: dragon-itPosted on 2009-08-17 at 06:45:02ID: 25114312
Well firstly... there is a "/Y" option on del that will stop you needing to pipe in allt those Y commands.
RD /S is probably what you want for removing the dirs, with a /Q it will do it quietly (i.e. not ask are you sure...). Be sure as other wise RD c:\ /s/q will have obvious consequences!
Steve