how can I make the below script not display a mesaage "Device not ready" as error output? I think it is refering to a CD or floppy drive that ready.
(for %%i in (C D E F G) do (dir %%i:\*bquest /s /b /ad))>dir_search.txt
for /f "tokens=* delims=" %%x in (dir_search.txt) do (
attrib +r "%%x\keycode" >NUL 2>&1