I get the above error message in a Windows batch file that tries to defrag two disks (Windows XP Professional SP3), on the second defrag. The first one works fine. The relevant code is:
echo My C: defrag started: %date% %time% > %logfile%
defrag C: /v 1>> %logfile% 2>&1
echo My C: defrag finished: %date% %time% >> %logfile%
echo My E: defrag started: %date% %time% >> %logfile%
defrag E: /v 1>> %logfile% 2>&1
echo My E: defrag finished: %date% %time% >> %logfile%
Google shows nothing helpful. Any ideas what is not working?