I have been writing a batch file to change the serial number of a floppy disk ( or other disk ) The batch file uses output redirection rather heavily. The batch file does change the serial number, but after a few uses it will give the error Can not redirect output to file 'nul'. ( or whichever device or file is being written to. ) I am using kernel 2038.
Here is the code @echo off echo Change the serial number of a disk! if "%1"=="a:" set disk=0 if "%1"=="b:" set disk=1 if "%1"=="c:" set disk=2 if "%1"=="d:" set disk=3 if "%1"=="e:" set disk=4 if "%1"=="f:" set disk=5 echo Creating Scripts... echo 1d > %tmp%\edscript echo 1,1r" Volume ", >> %tmp%\edscript echo l 0 %disk% 0 1 > %tmp%\dbscript echo e 0027 %5 >> %tmp%\dbscript echo e 0028 %4 >> %tmp%\dbscript echo e 0029 %3 >> %tmp%\dbscript echo e 002a %2 >> %tmp%\dbscript echo w 0 %disk% 0 1 >> %tmp%\dbscript echo q >> %tmp%\dbscript echo Computing changes... vol %1 > %tmp%\file1 echo Changing serial number... debug < %tmp%\dbscript > nul vol %1 > %tmp%\file2 fc %tmp%\file1 %tmp%\file2 > nul if not "%errorlevel%"=="0" goto success :failure echo 1,1r"is","is still" >> %tmp%\edscript echo Failure goto done :success echo 1,1r"is","is now" >> %tmp%\edscript echo Success! :done echo e >> %tmp%\edscript edlin %tmp%\file2 < %tmp%\edscript > nul type %tmp%\file2 echo Deleting temporary files... rem del %tmp%\??script %tmp%\file* ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user