中国DOS联盟

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

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

中国DOS联盟论坛
现在时间是 2026-08-07 16:21
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 怎样让format命令在XP下起作用 查看 698 回复 4
楼 主 怎样让format命令在XP下起作用 发表于 2008-03-04 20:42 ·  中国 陕西 汉中 电信
初级用户
积分 136
发帖 49
注册 2007-01-04 08:28
19年会员
UID 75413
性别 男
状态 离线
bat文件里的内容是这样的:
format d: /q/s/y
但是双击以后并没有格式D盘是何原因?
2 发表于 2008-03-04 21:11 ·  中国 重庆 电信
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
/s和/y是什么意思?

Microsoft Windows XP
(C) Copyright 1985-2001 Microsoft Corp.

C:\>format /?
Formats a disk for use with Windows XP.

FORMAT volume
FORMAT volume
FORMAT volume
FORMAT volume
FORMAT volume

volume Specifies the drive letter (followed by a colon),
mount point, or volume name.
/FS:filesystem Specifies the type of the file system (FAT, FAT32, or NTFS).
/V:label Specifies the volume label.
/Q Performs a quick format.
/C NTFS only: Files created on the new volume will be compressed
by default.
/X Forces the volume to dismount first if necessary. All opened
handles to the volume would no longer be valid.
/A:size Overrides the default allocation unit size. Default settings
are strongly recommended for general use.
NTFS supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K.
FAT supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K,
(128K, 256K for sector size > 512 bytes).
FAT32 supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K,
(128K, 256K for sector size > 512 bytes).

Note that the FAT and FAT32 files systems impose the
following restrictions on the number of clusters on a volume:

FAT: Number of clusters <= 65526
FAT32: 65526 < Number of clusters < 4177918

Format will immediately stop processing if it decides that
the above requirements cannot be met using the specified
cluster size.

NTFS compression is not supported for allocation unit sizes
above 4096.

/F:size Specifies the size of the floppy disk to format (1.44)
/T:tracks Specifies the number of tracks per disk side.
/N:sectors Specifies the number of sectors per track.
3 发表于 2008-03-04 21:51 ·  中国 陕西 汉中 电信
初级用户
积分 136
发帖 49
注册 2007-01-04 08:28
19年会员
UID 75413
性别 男
状态 离线
哦是我给搞错了!我记得是WIN98启动时格盘就是用的/Q/S
4 发表于 2008-03-04 21:56 ·  中国 福建 厦门 海沧区 电信
初级用户
积分 61
发帖 28
注册 2008-03-01 21:02
18年会员
UID 111818
性别 男
状态 离线
@echo off
format /q/u/y d:
pause
这才是经典。
5 发表于 2008-03-05 14:19 ·  中国 陕西 汉中 电信
初级用户
积分 136
发帖 49
注册 2007-01-04 08:28
19年会员
UID 75413
性别 男
状态 离线
先试下再给分
论坛跳转: