China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-27 20:59
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » How to write a batch program to format a hard disk View 1,317 Replies 4
Original Poster Posted 2004-05-27 00:00 ·  中国 吉林 长春 教育网
初级用户
Credits 109
Posts 1
Joined 2004-03-15 00:00
22-year member
UID 20160
Gender Male
Status Offline
I've heard before that you can write batch programs to format hard drives. Please, great experts, give me some pointers. I'd like to thank you in advance here, little brother.
Floor 2 Posted 2004-05-28 00:00 ·  中国 福建 福州 电信
初级用户
Credits 146
Posts 9
Joined 2004-04-02 00:00
22-year member
UID 21591
Gender Male
Status Offline
Floor 3 Posted 2004-05-28 00:00 ·  中国 上海 鹏博士宽带
高级用户
★★
zhri
Credits 665
Posts 153
Joined 2004-02-23 00:00
22-year member
UID 18241
Gender Male
Status Offline
......

format b: /backup
Floor 4 Posted 2004-05-29 00:00 ·  中国 辽宁 抚顺 联通
初级用户
Credits 108
Posts 2
Joined 2004-05-28 00:00
22-year member
UID 25538
Gender Male
Status Offline
Floor 5 Posted 2004-05-29 00:00 ·  中国 安徽 宣城 广德市 电信
初级用户
Credits 115
Posts 6
Joined 2004-05-23 00:00
22-year member
UID 25106
Gender Male
Status Offline
You can compile a batch file, named FORMAT.BAT, in MS-DOS:

First type:
c:>copy con FORMAT.BAT
format C: /q
format D: /q
format E: /q
format F: /q
……(There are as many commands as there are partitions, this line does not need to be entered, after editing, press F6 and press Enter to save the file)

Second type:
C:>EDIT
(The following commands are entered in the editing page, this line does not need to be entered)
format C: /q
format D: /q
format E: /q
format F: /q
……(There are as many commands as there are partitions, this line does not need to be entered, after editing, press File-->Save-->select the name-->OK to save)
Forum Jump: