Ask: How to use batch processing to determine whether a certain sector is an idle sector?
For example, after I use software to read sector 39, the obtained file is 039.txt, and the format is as follows:
--------------
Disk 0 Absolute Sector 39
00000004E00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
。。。。。
Omitted
------------------
The batch processing I used is as follows, please help everyone to see, where is the problem.
----------
rem @echo off
if exist %temp%\039.txt del %temp%\039.txt >nul
diskrw 0 39 1 /l >%temp%\039.txt
For /f "tokens=1-2 delims=:" %%i In ('type %temp%\039.txt ^| find ":"') do (
set sector=%%j
echo sector is "%sector%"
pause
if not "%sector%"==" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 " goto sector_2c
)
:sector_2d
echo Sector 39 is an idle sector.
echo.
pause
goto sector_2b
:sector_2c
echo Sector 39 is not an idle sector.
echo.
pause
:sector_2b
[ Last edited by lianjiang2004 on 2007-6-4 at 05:00 PM ]
For example, after I use software to read sector 39, the obtained file is 039.txt, and the format is as follows:
--------------
Disk 0 Absolute Sector 39
00000004E00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000004E90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
。。。。。
Omitted
------------------
The batch processing I used is as follows, please help everyone to see, where is the problem.
----------
rem @echo off
if exist %temp%\039.txt del %temp%\039.txt >nul
diskrw 0 39 1 /l >%temp%\039.txt
For /f "tokens=1-2 delims=:" %%i In ('type %temp%\039.txt ^| find ":"') do (
set sector=%%j
echo sector is "%sector%"
pause
if not "%sector%"==" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 " goto sector_2c
)
:sector_2d
echo Sector 39 is an idle sector.
echo.
pause
goto sector_2b
:sector_2c
echo Sector 39 is not an idle sector.
echo.
pause
:sector_2b
[ Last edited by lianjiang2004 on 2007-6-4 at 05:00 PM ]
Windows 一键还原
http://www.yjhy.com
http://www.yjhy.com
