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-22 15:22
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to make a batch file automatically identify which partition a certain drive letter is in under DOS? View 7,267 Replies 24
Floor 16 Posted 2004-04-27 00:00 ·  中国 广东 河源 电信
高级用户
★★
Credits 916
Posts 201
Joined 2003-05-04 00:00
23-year member
UID 1849
Gender Male
Status Offline
Re:Tamm
“TFind /f30,10 "label" %temp%\temp.txt >%temp%\temp1.txt ”
What does /f30,10 mean in this line? Suppose the content of temp.txt is as follows


Fixed Disk Drive Status

HD0 16379 MB

Drive Volume Name Size File System
1 PA Connectix 5601 MB FAT32
2 P IBM_SERVICE 6558 MB FAT32
3 L 102 MB FAT16
4 L 400 MB FAT32
5 L 196 MB FAT16
6 L 196 MB FAT16
7 L 251 MB FAT16
8 L IBM_SER 306 MB FAT32
9 L 243 MB FAT32
10 L 173 MB NTFS
11 L 227 MB FAT32
12 L 102 MB FAT16
13 L 322 MB FAT32
14 L 275 MB FAT32
15 L 196 MB FAT16
16 L 235 MB FAT16
17 L 329 MB FAT16
18 L 510 MB FAT32
19 P 157 MB FAT16
20 L 173 MB NTFS
21 L 227 MB FAT32
22 L 102 MB FAT16
23 L 275 MB FAT32
24 L 275 MB FAT32
25 L 275 MB FAT32
26 L 275 MB FAT32
27 L 275 MB FAT32
28 L 275 MB FAT32
29 L 275 MB FAT32
30 L 275 MB FAT32
31 L 275 MB FAT32
32 L IBM_SERVI 196 MB FAT16

Press any key to continue...


Then what should the f be changed to in “TFind /f30,10 "label" %temp%\temp.txt >%temp%\temp1.txt ”?
Floor 17 Posted 2004-04-28 00:00 ·  中国 湖南 株洲 电信
中级用户
★★
Credits 397
Posts 64
Joined 2004-04-18 00:00
22-year member
UID 22767
Gender Male
Status Offline
This is the positioning search of TFind. /Fc,l means to start searching from column c of each line, with a search range of l columns. The meaning of f30,10 is to search only the range from column 30 to column 40 of each line. This can greatly reduce the possibility of false searches. When you use it.com, you can open temp.txt to count and see in which column the volume label appears. Correctly: Because the length of the volume label is allowed to be 11 characters, so my /f30,10 actually has an error. In actual application, you can appropriately relax the search range.
Floor 18 Posted 2004-04-28 00:00 ·  中国 福建 福州 电信
初级用户
Credits 146
Posts 9
Joined 2004-04-02 00:00
22-year member
UID 21591
Gender Male
Status Offline
The following is the statement quoted from walu on 2004-4-24 13:31:34:
Alas, none of you understand. Fortunately, Rao Xiaochao, the author of One-key Recovery Wizard, can understand, and is preparing to compile a program with such a function.


The program is written. Open the attachment
Floor 19 Posted 2004-04-28 00:00 ·  中国 广东 河源 电信
高级用户
★★
Credits 916
Posts 201
Joined 2003-05-04 00:00
23-year member
UID 1849
Gender Male
Status Offline
Brother Rao Xiaochao is really amazing, thank you! Let's talk on QQ.
Floor 20 Posted 2004-05-20 00:00 ·  中国 江苏 徐州 电信
初级用户
Credits 177
Posts 21
Joined 2004-04-14 00:00
22-year member
UID 22484
Gender Male
Status Offline
It seems your problem has been solved. You can go and check the 2003 collected edition of Computer News. There are things you need there.
Floor 21 Posted 2004-05-20 00:00 ·  中国 浙江 杭州 中移铁通
初级用户
Credits 121
Posts 4
Joined 2004-05-16 00:00
22-year member
UID 24516
Gender Male
Status Offline
Wow, I can't even understand it! So inferior! I need to study hard!!
Floor 22 Posted 2004-05-22 00:00 ·  中国 河南 焦作 联通
中级用户
★★
Credits 343
Posts 50
Joined 2004-02-21 00:00
22-year member
UID 18062
Gender Male
Status Offline
Floor 23 Posted 2004-05-22 00:00 ·  中国 河北 唐山 联通
版主
★★★
操作系统爱好者
Credits 1,113
Posts 392
Joined 2002-11-11 00:00
23-year member
UID 228
Gender Male
Status Offline
The command-line support of GHOST8.0 originates from the GHO file in the NTFS partition, in the form of 1:2\xxx.gho (the xxx.gho file in the second partition of the first hard disk). GDISK n can display all partitions. Combined with the STRINGS and FIND commands, it can extract the drive letters (to make the drive letters displayed under DOS and WINXP consistent). I am currently working on writing a batch script for the new version of the GHOST8.0 boot disk.
DOS之家 http://doshome.com 站长 葛明阳
Floor 24 Posted 2004-05-23 00:00 ·  中国 广东 广州 联通
初级用户
Credits 162
Posts 14
Joined 2004-05-16 00:00
22-year member
UID 24476
Gender Male
Status Offline
The following is a quote from gmy on May 22, 2004 at 10:23:59 AM:
GHOST8.0 supports command lines. It comes from the GHO file in the NTFS partition, in the form of 1:2\xxx.gho (the xxx.gho file in the second partition of the first hard drive)

GDISK n can display all partitions. Combined with the STRINGS and FIND commands, it can extract the drive letters (to make the drive letters displayed in DOS and WINXP consistent). I am currently working on writing a batch script for the new version of the GHOST8.0 bootable disk.


Looking forward to it!
Floor 25 Posted 2004-05-29 00:00 ·  中国 浙江 台州 椒江区 电信
中级用户
★★
Credits 447
Posts 126
Joined 2004-02-10 00:00
22-year member
UID 17150
Gender Male
Status Offline
从来不用别人的东西,要用,也先改成自己的再说!
Forum Jump: