磁盘扇区读写、分区信息管理工具使用说明
===============
Diskrw.com 是磁盘扇区读写程序
Dpit.com 是分区信息管理工具
Dspt.com 是上述两者合成版本
===============
Syntax:
DSPT
Disk: 0-First Hard Disk, 1-Second Hard Disk, ...(0为第一硬盘,1为第二硬盘)
A:, B, C:, D: ....:
Start: Disk Absolute Sector Number (扇区号,应为大于等于0的整数,磁盘扇区从0开始编号)
:n Partition Number (:n n为分区号,可以通过命令:dspt 0 /l 得到)
Sectors: Total Sectors to be Processed (要处理的扇区数量,取值范围 1-4194303 即0x0-0x3FFFFF)
/S: Save Disk Sector Info to File (保存磁盘扇区到文件)
/R: Restore Disk Sector Info from File (把文件信息恢复到磁盘,要求文件大小应该等于要恢复的扇区数量乘512)
/C: Compare Disk Sector Info with File (把文件信息与磁盘扇区信息进行比较,要求文件大小应该等于要比较的扇区数量乘512)
FileName: Disk Sector Info File (文件名字)
/Y: Assume Yes on all Queries (对要求确认的请求默认为 Y ,并且不显示版权信息)
例子:
dspt 0 0 1 /s mbr0.bin 将第一硬盘的从0号扇区开始共一个扇区的信息保存到文件 mbr0.bin ,该位置为磁盘的主引导记录。
dspt 1 100 1000 /s sectors.bin 将第二硬盘从第100个扇区开始共1000个扇区的信息保存到 sectors.bin ,保存后文件大小应该为512000字节。
dspt 0 0 1 /c mbr0.bin 将文件信息与第一硬盘从0号扇区开始共一个扇区的信息进行比较,要求文件大小为512字节。
dspt 0 0 1 /r mbr0.bin 将文件信息恢复到第一硬盘从0号扇区开始共一个扇区,要求文件大小为512字节。
DSPT
/L: List Disk Sector Info on Screen (将磁盘信息在屏幕上显示)
/P: Pause echo Screen (满屏暂停)
/A: Show ASC Value (显示 ASC 码)
DSPT
/E: Clear Disk Sector Info (清空扇区信息)
例子:
dspt 0 0 100 /L /p /a 将第一硬盘的从0号扇区开始共100个扇区的信息显示在屏幕上,满屏暂停并显示 ASC 码。
dspt 1 100 1000 /e 将第二硬盘从第100个扇区开始共1000个扇区的信息清空。
DSPT
SrcDisk/DstDisk: 0-First Hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ....
Start: Disk Absolute Sector Number
Sectors: Total Sectors to be Processed
/D: Copy Disk Sector Info from SrcDisk to DstDisk (磁盘信息复制)
Offset: Disk Absolute Sector Number (扇区号,应为大于等于0的整数,磁盘扇区从0开始编号)
/Y: Assume Yes on all Queries
例子:
dspt 0 0 1000 /d 0 100 将第一硬盘的从0号扇区开始共1000个扇区的信息复制到第一硬盘第100扇区开始的共1000个扇区。
DSPT
Disk: 0-First Hard disk, 1-Second Hard Disk, ...
/S: Save Disk Partition Info to File (保存磁盘分区信息)
/R: Restore Disk Partiton Info from File (从文件恢复磁盘分区信息)
/C: Compare Disk Partiton Info with File (将磁盘分区信息与文件信息进行比较)
FileName: Disk Partition Info File
/Y: Assume Yes on all Queries
例子:
dspt 1 /s dsk1part.bin 将第二硬盘的分区信息保存到文件 dsk1part.bin
DSPT
Save Partition Boot Record to File
例子:
dspt 0 /s dbr0.bin /dbr 将第一硬盘的每个分区的引导信息保存到文件 dbr0.bin
关于文件大小的说明:保存的分区信息文件和 DBR 信息文件的大小应该为 (516×保存的扇区数量 + 1)
DSPT
/L: List Disk Partition Info on Screen (在屏幕上显示磁盘分区信息)
/NOEXT: Don't Display Big Extended Partition (不显示总的扩展分区信息)
例子:
dspt 0 /l 将第一硬盘的分区信息保显示在屏幕上。
DSPT
Active Disk Partition n
例子:
dspt 0 /ACT:2 将第一硬盘的第二分区激活,只有主分区才能被激活。
DSPT
Find Disk Partition 查找分区
type: Can be FAT16/FAT32/FAT/NTFS/LINUX/ALL
例子:
dspt 0 /Find:all 查找第一硬盘的所有分区,显示格式0:1 0:2 ....。
DSPT
ReBuild Disk Main Boot Record
/NOBACK: Don't Backup old MBR
例子:
dspt 0 /mbr 重建第一硬盘的主引导记录,默认将原主引导记录备份到 dsk?mbr.bin ,与 Fdisk/mbr 功能相同。
DSPT
Hide/Unhide Disk Partition n (隐藏/显示分区n, n可通过 dspt 0 /l 得到)
例子:
dspt 0 /hide:3 隐藏第一硬盘的第三个分区。
dspt 0 /unhide:3 显示第一硬盘的第三个分区。
DSPT
Disk: 0-First Hard disk, 1-Second Hard Disk, ...
/DPS: Save Disk Partition Info to Last Cluster (将分区信息保存到硬盘最后一个簇)
/DPR: Restore Disk Partiton Info from Last Cluster (从硬盘最后一个簇,恢复磁盘的分区信息,前提是应该保存分区信息)
/DPC: Compare Disk Partiton Info with Last Cluster (将分区信息与硬盘最后一个簇信息比较)
/Y: Assume Yes on all Queries
说明:该命令慎用,如果你的 BIOS 不支持大硬盘,通过 BIOS 得到的磁盘最后一个簇可能不是真正的最后簇,这时对该簇的读写可能造成数据丢失。
2007.1.15
dpit 1.15 测试版本,加入了对FAT32、NTFS卷标的支持,并能够显示FAT32分区的 DOS 盘符。
FAT16我这里没有测试环境,请大家帮忙测试一下卷标和盘符是否正确。
2007.2.15
发 diskrw 2007.1.31 DOS 正式版本。
支持 DOS 原生盘符,目前不支持IFS 和 NTFS4DOS生成的盘符。
2007.2.26
发 dspt 和 dpit DOS正式版本
2007.5.29
增加一个小工具
在262楼有一个修正的 DSPT DOS 版本
2007.7.12
1 增加磁盘比较功能
DISKRW
Disk: 0-First Hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ...
Start: Disk Absolute Sector Number
Sectors: Total Sectors to be Processed
/O: Compare Disk Sector Info with DstDisk
DstDisk: 0-First Hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ...
Offset: Disk Absolute Sector Number
例子:
diskrw c: 20 10 /O d: 5 将C:盘的第20号扇区开始的10个扇区和D:盘第5号扇区开始的10个扇区比较
diskrw 0 10 10 /O c: 0 将第一物理磁盘的第10号扇区开始的10个扇区和C:盘第0号扇区开始的10个扇区比较
2 增加直接修改磁盘扇区的功能
DISKRW /M /Hex:Value
Disk: 0-First Hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ...
SectorNo: Disk Absolute Secotor Number
Offset: Offset in Specified Sector (0..511)
/M: Modify Disk Sector Info
/Hex: Hexadecimal Stytle
Value: Hexadecimal Digital String (No more than 32 characters)
例子:
diskrw c: 20 0 /M /Hex:ABCDEF 将C:盘的第20号扇区偏移位置0处的三个字节修改为 0xAB,0xCD,0xEF
注:对扇区修改每次最多16个字节(32个字符)
2007.7.17更新
dsptw 〔disk〕 /l /a
增加参数 /a 可以在Win32环境下准确得到磁盘的扇区总数
2007.8.8
DOS版本 Diskrw 更新
1、修正当磁盘为DOS盘符时,磁盘编辑功能存在的bug。
Win32版本更新Dsptw和diskrw
2007.8.15
diskrw更新在一楼
dspt更新在290楼
dspt 错误代码:
#define SUCCESS 0
#define READ_DISK_ERROR 1
#define WRITE_DISK_ERROR 2
#define OPEN_FILE_ERROR 3
#define CREATE_FILE_ERROR 4
#define READ_FILE_ERROR 5
#define WRITE_FILE_ERROR 6
#define FILE_SIZE_ERROR 7
#define TOO_MANY_PARTITIONS 8
#define PARTITION_NUMBER_ERROR 9
#define PARTITION_CANNOT_BE_HIDDEN 10
#define PARTITION_CANNOT_BE_UNHIDDEN 11
#define ONLY_PRIMARY_PARTITION_CAN_BE_ACTIVE 12
#define UNSURPPORT_PARTITION 13
#define DISK_ERROR 14
#define NOT_ENOUGH_MEMORY 15
#define PARAMETER_ERROR 16
#define USER_CANCEL 17
#define LIST_OK 100
#define OS_ERROR 201
#define NAME_ERROR 202
#define COMPARE_MISMATCH 203
#define PRG_SIZE_ERROR 204
#define SECTORS_ERROR 205
#define PARAMETERS_TOO_FEW 207
#define UNKOWN_ERROR 1000
2008.9.27
Win32 版本 diskrw 更新
http://upload.cn-dos.net/img/798.rar
本次修改的内容:
1 命令调整,原来的 /E 命令(删除扇区内容)更改为 /F 命令 (扇区内容充填)
原来的 /E 命令是使用 0 充填指定扇区
现在的 /F 命令可指定任何值对扇区进行充填,如果不输入 Value 值则和原版本的 /E 命令执行相同的功能
DISKRW
/F: Fill Disk Sector Info with Value
Value: an Integer (0..255), default is 0
2 命令调整,将修改扇区的命令有原来的 /M (Modify) 调整为 /E (Edit) 更为直观
DISKRW
SectorNo: Absolute/Relative Sector No. of Disk
Offset: The Offset in Specified Sector (0..511)
/E: Edit Disk Sector Info
/HEX: Hex Style
Value: Hex Digital String (No more than 32 characters)
3 功能增加,增加移动扇区的功能,使用的命令为 /M
DISKRW
/M: Move Disk Sector DATA form Disk to DstDisk
DstDisk: 0-First hard Disk, 1-Second hard Disk, ...
A:, B:, C:, D: ...
Offset: Absolute/Relative Sector No. of Disk
4 修正了使用 16 进制数的大小写存在的 Bug
DOS 版本不存在此问题
2008.11.1
Diskrw for DOS
与原来版本改变
1、增加参数 Offset
此参数用来指定文件内部的偏移位置,默认值为0(文件的开始)
如果给出了Offset的值,但是文件不存在,则给出的Offset值被忽略。
例子:
Diskrw C: 0 10 /S sector.bin 10
将磁盘C:从起始位置开始的10个扇区,写入文件sector.bin。如果文件不存在,则sector.bin的大小为5120个字节,如果文件存在,如文件大小小于10字节程序会给出错误信息,如果文件大小大于等于10字节,则程序会将扇区内容写入文件的偏移位置10开始的5120字节中,文件中的原来信息会被覆盖(如文件长度小于5130字节则文件长度增加)。
DISKRW
Disk: 0-First Hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ...
Start: Disk Absolute Sector Number
Sectors: Total Sectors to be Processed
/S: Save Disk Sector Info to File
/R: Restore Disk Sector Info from File
/C: Compare Disk Sector Info with File
FileName: Disk Sector Info File
/Offset: The Offset In FileName
2、增加功能 /M
这个功能在win32版本中早已实现,将磁盘Disk中从位置Start开始的Sectors个扇区内容移动到磁盘DstDisk中Offset的位置,移动后Disk中相应位置的扇区信息会被清除,如移出扇区和移入扇区位置叠加,程序会智能选择要清除的扇区部分。
DISKRW
/D: Duplicate Disk Sector Info from Disk to DstDisk
/O: cOmpare Disk Sector Info with DstDisk
/M: Move Disk Sector Info from Disk to DstDisk
DstDisk: 0-First Hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ...
Offset: Disk Absolute Sector Number
3、增加参数 /Asc
编辑磁盘可以直接使用 ASCII 码,长度不超过16字符。
DISKRW :
SectorNo: Disk Absolute Secotor Number
Offset: Offset in Specified Sector (0..511)
/E: Edit Disk Sector Info
/Hex: Hex Style
/Asc: ASCII Style
Value: Hex_Digital/ASCII String (32/16 Characters Maximum)
4、扇区内部处理命令(只处理单个扇区)
如果Bytes输入0或者输入数据较大(超出扇区边界),则程序处理从Offset开始到扇区结束的字节数
例子:
Diskrw 0 0 446 /b 64 mbr.dat 备份第一硬盘(磁盘0)第一扇区(0扇区)中偏移位置446开始 的64个字节到文件 mbr.dat。(这里备份的就是磁盘MBR中的分区表信息)
DISKRW
/B: Backup Disk Sector Info to File
/V: Vertify Disk Sector Info with File
/U: Update Disk Sector Info from File
Bytes: Bytes to Process (0..512)
diskrw for Win32
1、修正了显示磁盘扇区函数中存在的bug,当扇区数目为16的倍数时,显示最后一屏时存在的问题,重新写了扇区显示函数。
2、修正了其中一处当磁盘读写失败时,返回值为 SUCCESS 的错误。
http://www.cn-dos.net/forum/attachment.php?aid=4373&checkid=65c57&download=1
2008.11.13 diskrw for DOS 终结版本 389楼
http://www.cn-dos.net/forum/attachment.php?aid=4378&checkid=8ef93&download=1
2008.11.15
diskrw 两栖版本
http://www.cn-dos.net/forum/attachment.php?aid=4386&checkid=090a9&download=1
2008.11.29 dsptw更新
增加可以显示分区ID值的开关 /GetID (适用于 /L 和 /find 命令)
使用方法:
dsptw 0 /l /getid
dsptw 0 /find:all /getid
http://www.cn-dos.net/forum/attachment.php?aid=4418&checkid=8664f&download=1
Disk Sector Reading and Writing, Partition Information Management Tool Usage Instructions
=============================
Diskrw.com is a disk sector reading and writing program
Dpit.com is a partition information management tool
Dspt.com is a combined version of the above two
=============================
Syntax:
DSPT
Disk: 0-First Hard Disk, 1-Second Hard Disk, ...(0 is the first hard disk, 1 is the second hard disk)
A:, B, C:, D: ....:
Start: Disk Absolute Sector Number (Sector number, should be an integer greater than or equal to 0, disk sectors are numbered starting from 0)
:n Partition Number (:n n is the partition number, which can be obtained through the command: dspt 0 /l)
Sectors: Total Sectors to be Processed (Number of sectors to be processed, value range 1-4194303, i.e., 0x0-0x3FFFFF)
/S: Save Disk Sector Info to File (Save disk sectors to file)
/R: Restore Disk Sector Info from File (Restore file information to disk, requiring the file size to be equal to the number of sectors to be restored multiplied by 512)
/C: Compare Disk Sector Info with File (Compare file information with disk sector information, requiring the file size to be equal to the number of sectors to be compared multiplied by 512)
FileName: Disk Sector Info File (File name)
/Y: Assume Yes on all Queries (Assume yes for all confirmation requests and do not display copyright information)
Examples:
dspt 0 0 1 /s mbr0.bin Save the information of one sector starting from sector 0 of the first hard disk to the file mbr0.bin. This position is the master boot record of the disk.
dspt 1 100 1000 /s sectors.bin Save the information of 1000 sectors starting from the 100th sector of the second hard disk to sectors.bin. The file size after saving should be 512000 bytes.
dspt 0 0 1 /c mbr0.bin Compare the file information with the information of one sector starting from sector 0 of the first hard disk. The file size is required to be 512 bytes.
dspt 0 0 1 /r mbr0.bin Restore the file information to one sector starting from sector 0 of the first hard disk. The file size is required to be 512 bytes.
DSPT
/L: List Disk Sector Info on Screen (List disk information on the screen)
/P: Pause echo Screen (Pause when full screen)
/A: Show ASC Value (Show ASC code)
DSPT
/E: Clear Disk Sector Info (Clear sector information)
Examples:
dspt 0 0 100 /L /p /a Display the information of 100 sectors starting from sector 0 of the first hard disk on the screen, pause when full screen and display ASC code.
dspt 1 100 1000 /e Clear the information of 1000 sectors starting from the 100th sector of the second hard disk.
DSPT
SrcDisk/DstDisk: 0-First Hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ....
Start: Disk Absolute Sector Number
Sectors: Total Sectors to be Processed
/D: Copy Disk Sector Info from SrcDisk to DstDisk (Copy disk information)
Offset: Disk Absolute Sector Number (Sector number, should be an integer greater than or equal to 0, disk sectors are numbered starting from 0)
/Y: Assume Yes on all Queries
Examples:
dspt 0 0 1000 /d 0 100 Copy the information of 1000 sectors starting from sector 0 of the first hard disk to 1000 sectors starting from sector 100 of the first hard disk.
DSPT
Disk: 0-First Hard disk, 1-Second Hard Disk, ...
/S: Save Disk Partition Info to File (Save disk partition information)
/R: Restore Disk Partiton Info from File (Restore disk partition information from file)
/C: Compare Disk Partiton Info with File (Compare disk partition information with file information)
FileName: Disk Partition Info File
/Y: Assume Yes on all Queries
Examples:
dspt 1 /s dsk1part.bin Save the partition information of the second hard disk to the file dsk1part.bin
DSPT
Save Partition Boot Record to File
Examples:
dspt 0 /s dbr0.bin /dbr Save the boot information of each partition of the first hard disk to the file dbr0.bin
Explanation about file size: The size of the saved partition information file and DBR information file should be (516 × number of sectors saved + 1)
DSPT
/L: List Disk Partition Info on Screen (List disk partition information on the screen)
/NOEXT: Don't Display Big Extended Partition (Don't display total extended partition information)
Examples:
dspt 0 /l Display the partition information of the first hard disk on the screen.
DSPT
Active Disk Partition n
Examples:
dspt 0 /ACT:2 Activate the second partition of the first hard disk. Only primary partitions can be activated.
DSPT
Find Disk Partition (Find partition)
type: Can be FAT16/FAT32/FAT/NTFS/LINUX/ALL
Examples:
dspt 0 /Find:all Find all partitions of the first hard disk, and the display format is 0:1 0:2 ....
DSPT
ReBuild Disk Main Boot Record
/NOBACK: Don't Backup old MBR
Examples:
dspt 0 /mbr Rebuild the main boot record of the first hard disk. By default, the original main boot record is backed up to dsk?mbr.bin, which has the same function as Fdisk/mbr.
DSPT
Hide/Unhide Disk Partition n (Hide/Unhide partition n, n can be obtained through dspt 0 /l)
Examples:
dspt 0 /hide:3 Hide the third partition of the first hard disk.
dspt 0 /unhide:3 Unhide the third partition of the first hard disk.
DSPT
Disk: 0-First Hard disk, 1-Second Hard Disk, ...
/DPS: Save Disk Partition Info to Last Cluster (Save partition information to the last cluster of the hard disk)
/DPR: Restore Disk Partiton Info from Last Cluster (Restore disk partition information from the last cluster of the hard disk, provided that partition information has been saved)
/DPC: Compare Disk Partiton Info with Last Cluster (Compare partition information with the information of the last cluster of the hard disk)
/Y: Assume Yes on all Queries
Note: Use this command with caution. If your BIOS does not support large hard disks, the last cluster obtained through BIOS may not be the real last cluster. At this time, reading and writing to this cluster may cause data loss.
2007.1.15
dpit 1.15 test version, added support for FAT32, NTFS volume labels, and can display the DOS drive letter of FAT32 partitions.
I don't have a test environment for FAT16, please help test whether the volume label and drive letter are correct.
2007.2.15
Release diskrw 2007.1.31 DOS official version.
Support DOS native drive letters, currently do not support IFS and NTFS4DOS generated drive letters.
2007.2.26
Release dspt and dpit DOS official versions
2007.5.29
Add a small tool
There is a modified DSPT DOS version on floor 262
2007.7.12
1 Add disk comparison function
DISKRW
Disk: 0-First Hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ...
Start: Disk Absolute Sector Number
Sectors: Total Sectors to be Processed
/O: Compare Disk Sector Info with DstDisk
DstDisk: 0-First Hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ...
Offset: Disk Absolute Sector Number
Examples:
diskrw c: 20 10 /O d: 5 Compare 10 sectors starting from sector 20 of drive C: with 10 sectors starting from sector 5 of drive D:
diskrw 0 10 10 /O c: 0 Compare 10 sectors starting from sector 10 of the first physical disk with 10 sectors starting from sector 0 of drive C:
2 Add the function to directly modify disk sectors
DISKRW /M /Hex:Value
Disk: 0-First Hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ...
SectorNo: Disk Absolute Secotor Number
Offset: Offset in Specified Sector (0..511)
/M: Modify Disk Sector Info
/Hex: Hexadecimal Stytle
Value: Hexadecimal Digital String (No more than 32 characters)
Examples:
diskrw c: 20 0 /M /Hex:ABCDEF Modify the three bytes at offset position 0 of sector 20 of drive C: to 0xAB, 0xCD, 0xEF
Note: Each modification of a sector is up to 16 bytes (32 characters) at most
2007.7.17 Update
dsptw 〔disk〕 /l /a
Add parameter /a to accurately get the total number of sectors of the disk in Win32 environment
2007.8.8
DOS version Diskrw update
1. Fix the bug in the disk editing function when the disk is a DOS drive letter.
Win32 version update Dsptw and diskrw
2007.8.15
diskrw update on the first floor
dspt update on floor 290
dspt error code:
#define SUCCESS 0
#define READ_DISK_ERROR 1
#define WRITE_DISK_ERROR 2
#define OPEN_FILE_ERROR 3
#define CREATE_FILE_ERROR 4
#define READ_FILE_ERROR 5
#define WRITE_FILE_ERROR 6
#define FILE_SIZE_ERROR 7
#define TOO_MANY_PARTITIONS 8
#define PARTITION_NUMBER_ERROR 9
#define PARTITION_CANNOT_BE_HIDDEN 10
#define PARTITION_CANNOT_BE_UNHIDDEN 11
#define ONLY_PRIMARY_PARTITION_CAN_BE_ACTIVE 12
#define UNSURPPORT_PARTITION 13
#define DISK_ERROR 14
#define NOT_ENOUGH_MEMORY 15
#define PARAMETER_ERROR 16
#define USER_CANCEL 17
#define LIST_OK 100
#define OS_ERROR 201
#define NAME_ERROR 202
#define COMPARE_MISMATCH 203
#define PRG_SIZE_ERROR 204
#define SECTORS_ERROR 205
#define PARAMETERS_TOO_FEW 207
#define UNKOWN_ERROR 1000
2008.9.27
Win32 version diskrw update
http://upload.cn-dos.net/img/798.rar
Content of this modification:
1 Command adjustment, the original /E command (delete sector content) is changed to /F command (sector content filling)
The original /E command fills the specified sector with 0
The current /F command can specify any value to fill the sector. If no Value value is entered, it performs the same function as the original version's /E command
DISKRW
/F: Fill Disk Sector Info with Value
Value: an Integer (0..255), default is 0
2 Command adjustment, change the command to modify the sector from the original /M (Modify) to /E (Edit) for more intuitive
DISKRW
SectorNo: Absolute/Relative Sector No. of Disk
Offset: The Offset in Specified Sector (0..511)
/E: Edit Disk Sector Info
/HEX: Hex Style
Value: Hex Digital String (No more than 32 characters)
3 Function addition, add the function to move sectors, the used command is /M
DISKRW
/M: Move Disk Sector DATA form Disk to DstDisk
DstDisk: 0-First hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ...
Offset: Absolute/Relative Sector No. of Disk
4 Fix the Bug of the case of using hexadecimal numbers
DOS version has no this problem
2008.11.1
Diskrw for DOS
Different from the original version
1. Add parameter Offset
This parameter is used to specify the offset position inside the file, the default value is 0 (start of the file)
If the Offset value is given but the file does not exist, the given Offset value is ignored.
Examples:
Diskrw C: 0 10 /S sector.bin 10
Write 10 sectors from the starting position of drive C: to the file sector.bin. If the file does not exist, the size of sector.bin is 5120 bytes. If the file exists, such as the file size is less than 10 bytes, the program will give an error message. If the file size is greater than or equal to 10 bytes, the program will write the sector content to the offset position 10 of the file starting from 5120 bytes, and the original information in the file will be overwritten (if the file length is less than 5130 bytes, the file length will increase).
DISKRW
Disk: 0-First Hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ...
Start: Disk Absolute Sector Number
Sectors: Total Sectors to be Processed
/S: Save Disk Sector Info to File
/R: Restore Disk Sector Info from File
/C: Compare Disk Sector Info with File
FileName: Disk Sector Info File
/Offset: The Offset In FileName
2. Add function /M
This function has long been implemented in the win32 version, move the sector content of Sectors from position Start in disk Disk to position Offset in disk DstDisk. After moving, the corresponding position sector information in Disk will be cleared. If the moved sector and the moved-in sector positions overlap, the program will intelligently select the part of the sector to be cleared.
DISKRW
/D: Duplicate Disk Sector Info from Disk to DstDisk
/O: cOmpare Disk Sector Info with DstDisk
/M: Move Disk Sector Info from Disk to DstDisk
DstDisk: 0-First Hard Disk, 1-Second Hard Disk, ...
A:, B:, C:, D: ...
Offset: Disk Absolute Sector Number
3. Add parameter /Asc
Edit the disk can directly use ASCII code, the length is not more than 16 characters.
DISKRW :
SectorNo: Disk Absolute Secotor Number
Offset: Offset in Specified Sector (0..511)
/E: Edit Disk Sector Info
/Hex: Hex Style
/Asc: ASCII Style
Value: Hex_Digital/ASCII String (32/16 Characters Maximum)
4. Sector internal processing command (only process a single sector)
If Bytes is input as 0 or the input data is large (exceeds the sector boundary), the program processes the number of bytes from Offset to the end of the sector
Examples:
Diskrw 0 0 446 /b 64 mbr.dat Backup 64 bytes starting from offset position 446 in the first sector (sector 0) of the first hard disk (disk 0) to the file mbr.dat. (Here, the partition table information in the disk MBR is backed up)
DISKRW
/B: Backup Disk Sector Info to File
/V: Vertify Disk Sector Info with File
/U: Update Disk Sector Info from File
Bytes: Bytes to Process (0..512)
diskrw for Win32
1. Fix the bug in the function of displaying disk sectors. When the number of sectors is a multiple of 16, there is a problem when displaying the last screen. Rewrite the sector display function.
2. Fix the error that the return value is SUCCESS when disk reading and writing fails.
http://www.cn-dos.net/forum/attachment.php?aid=4373&checkid=65c57&download=1
2008.11.13 diskrw for DOS final version floor 389
http://www.cn-dos.net/forum/attachment.php?aid=4378&checkid=8ef93&download=1
2008.11.15
diskrw amphibious version
http://www.cn-dos.net/forum/attachment.php?aid=4386&checkid=090a9&download=1
2008.11.29 dsptw update
Add a switch /GetID that can display the partition ID value (applicable to /L and /find commands)
Usage method:
dsptw 0 /l /getid
dsptw 0 /find:all /getid
http://www.cn-dos.net/forum/attachment.php?aid=4418&checkid=8664f&download=1