|
Jnwei1202
初级用户
 
积分 197
发帖 33
注册 2003-7-24
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
楼上的
加了能用吗?
比如 C: D: E: F:
FAT32 NTFS NTFS FAT32
DOS 下加载分区后盘符是怎么排列的? 排出盘符顺序最后一个盘符就是最后一个分区吗?
如果 最后一个区是 NTFS 格式的 加载的NTFS 驱动是否能向 NTFS 格式里写数据
我知道 用 OMNIFS 可以向NTFS 格式里写数据
但不知道要怎么把查出有多少个分区把他设成 一个变量%disk%
omnifs mkdir 1.%disk%
Above the building
Can it be used if added?
For example C: D: E: F:
FAT32 NTFS NTFS FAT32
How are the drive letters arranged after loading partitions under DOS? Is the last drive letter the last partition?
If the last partition is in NTFS format, can the loaded NTFS driver write data to the NTFS format?
I know that OMNIFS can write data to the NTFS format, but I don't know how to find out how many partitions there are and set it as a variable %disk%
omnifs mkdir 1.%disk%
|
|
2006-9-28 22:23 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
贴我自己的DOS维护盘里的一段代码吧,家当哦<img src="images/smilies/face-laugh.png" align="absmiddle" border="0">
借助gdisk和gdisk32实现DOS,CMD下通用方法,也不用加载讨厌的NTFS驱动了。
Gdisk版本8.3
@echo off
::中国DOS联盟论坛: fastslz
FOR %%A IN (id1 id2 id3 id4 id5 id6 id7 id8 id9) DO SET %%A=
Gdisk 1 >Gdisk.TXT
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id1=C盘(NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id1=C盘(FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id2=D盘(NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id2=D盘(FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id3=E盘(NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id3=E盘(FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id4=F盘(NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id4=F盘(FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id5=G盘(NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id5=G盘(FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id6=H盘(NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id6=H盘(FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id7=I盘(NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id7=I盘(FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id8=J盘(NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id8=J盘(FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id9=K盘(NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id9=K盘(FAT32)
cls
echo.
echo.
echo 显示第1硬盘上分区数及磁盘类型
echo.
echo %id1% %id2% %id3% %id4% %id5% %id6% %id7% %id8% %id9%
PAUSE >NUL
rem del Gdisk.TXT
Posting a piece of code from my own DOS maintenance disk, it's my treasure :)
Using the general method for DOS and CMD with gdisk and gdisk32, no need to load the annoying NTFS driver.
Gdisk Version 8.3
@echo off
::China DOS Union Forum: fastslz
FOR %%A IN (id1 id2 id3 id4 id5 id6 id7 id8 id9) DO SET %%A=
Gdisk 1 >Gdisk.TXT
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id1=C drive (NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id1=C drive (FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id2=D drive (NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id2=D drive (FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id3=E drive (NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id3=E drive (FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id4=F drive (NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id4=F drive (FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id5=G drive (NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id5=G drive (FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id6=H drive (NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id6=H drive (FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id7=I drive (NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id7=I drive (FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id8=J drive (NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id8=J drive (FAT32)
FIND /i /n "NTFS" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id9=K drive (NTFS)
FIND /i /n "FAT32" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 set id9=K drive (FAT32)
cls
echo.
echo.
echo Display the number of partitions and disk type on the first hard drive
echo.
echo %id1% %id2% %id3% %id4% %id5% %id6% %id7% %id8% %id9%
PAUSE >NUL
rem del Gdisk.TXT
|

第一高手 第二高手
我的小站
 |
|
2006-9-28 23:08 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
如果考虑你的启动盘是多用途话,某些硬盘有2个以上主分区代码就不正确了。自己修改一下吧
把17楼作为方案1
FIND /i /n "PRIMARY" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 ECHO 你的第1硬盘上有2个以上主分区
GOTO 方案2
:方案2
.........不重复了自己掂量着改吧
觉的这个方法好给我评分哦<img src="images/smilies/face-raspberry.png" align="absmiddle" border="0">
Last edited by fastslz on 2006-9-28 at 23:33 ]
If considering that your boot disk is multi-purpose, some hard drives having more than 2 primary partition codes are incorrect. Modify it yourself.
Take floor 17 as Scheme 1.
FIND /i /n "PRIMARY" Gdisk.TXT|FIND /i "" >nul
if not errorlevel 1 ECHO There are more than 2 primary partitions on your first hard drive.
GOTO Scheme 2
:Scheme 2
.........Don't repeat, weigh and modify by yourself.
If you think this method is good, give me a rating哦:P
Last edited by fastslz on 2006-9-28 at 23:33 ]
|

第一高手 第二高手
我的小站
 |
|
2006-9-28 23:31 |
|
|
jieok3375
中级用户
  
积分 282
发帖 130
注册 2006-9-20 来自 广东
状态 离线
|
|
2006-9-30 04:09 |
|
|
jieok3375
中级用户
  
积分 282
发帖 130
注册 2006-9-20 来自 广东
状态 离线
|
|
2006-9-30 04:09 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
这个也是对付DOS与Windows下最好的方案,单硬盘原生Windows情况下系统盘符完全一样!
This is also the best solution for dealing with DOS and Windows! Under the native Windows situation of a single hard drive, the system drive letters are exactly the same!
|

第一高手 第二高手
我的小站
 |
|
2006-9-30 05:59 |
|
|
lizaoyou
中级用户
  
积分 210
发帖 85
注册 2007-1-14 来自 广东广州
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
迟来,学习中...
参考6楼redtek兄的思路,可兼容纯DOS模式的代码如下:
@ECHO OFF
FOR %%i IN (c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) DO IF EXIST %%i:\nul SET last=%%i:
MD %last%\tmp
(测试环境:winXPsp2_CMD、MSDOS7.10)
纯DOS下的问题:
1. IF命令不能直接测试盘符的存在,可通过测试空目录(nul)实现;是否有更好的办法?
2. FOR命令也不能使用"GOTO :EOF"退出循环,求教redtek兄及各位有何方法可实现“条件成立时退出FOR”?
wait...
A bit late, learning...
Referencing the idea of brother redtek on floor 6, the code compatible with pure DOS mode is as follows:
@ECHO OFF
FOR %%i IN (c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) DO IF EXIST %%i:\nul SET last=%%i:
MD %last%\tmp
(Testing environment: winXPsp2_CMD, MSDOS7.10)
Problems under pure DOS:
1. The IF command cannot directly test the existence of a drive letter, which can be achieved by testing an empty directory (nul); is there a better way?
2. The FOR command also cannot use "GOTO :EOF" to exit the loop. Asking brother redtek and everyone, is there any method to achieve "exit the FOR when the condition is met"?
wait...
|
|
2007-1-25 08:31 |
|
|
jckjuc
初级用户
  白小痴
积分 48
发帖 23
注册 2006-9-16
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
呵呵。。大家好热心啊。下次我有问题也要麻烦大家啦。
真是很多东西要向大侠们学习啊
Hehe. Everyone is so enthusiastic. Next time I have questions, I will trouble you all too. There are really many things to learn from the experts.
|
|
2007-2-1 03:27 |
|
|
wlt2007
初级用户
 
积分 42
发帖 20
注册 2007-2-2
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
没有看明白:不就在一个分区建一个文件夹吗?MD?
什么是最后一个分区?仍然不明白?在windows下一般都是先入为主,字母索引的方式排列,最后一个分区是否是排列最后的那个?在DOS下的启动检测中最后的那个?——均排除不可识别和不可写入分区。如是:咱们倒要提一个问题——今天你可以在最后一个分区建目录;明天或后天更改的盘符,它还在最后一个分区吗?咱们质疑其实用价值!如否:LZ的系统中有Linux,上述说的都是废话。
Didn't understand: Isn't it just creating a folder in a partition? MD?
What is the last partition? Still don't understand? In Windows, it's generally the first-come-first-served, arranged by letter index. Is the last partition the one arranged at the end? In the boot detection in DOS, the last one? ——All exclude unrecognizable and unwritable partitions. If so: Let's raise a question——Today you can create a directory in the last partition; if the drive letter is changed tomorrow or the day after tomorrow, will it still be in the last partition? We question its practical value! If not: The LZ's system has Linux, and the above said are all nonsense.
|
|
2007-2-11 13:52 |
|
|
0451lym
高级用户
   
积分 760
发帖 357
注册 2005-10-10
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
呵呵,还是这个问题郁闷.
分区符转换就可以了.
1种方法,启动系统的时候直接转换成分区符的分析文件.然后调用以1.1: 1.2: 1.3: 1.4:......的方式判断第1块硬盘的最后一个分区符,在转换成盘符,MD建立.或者弄自解压的空文件夹包,复制过去自动释放!
2种方法也是基本雷同不太细说了!
Hehe, still this problem is annoying.
Partition separator conversion is okay.
One method: when booting the system, directly convert it into the analysis file of the partition separator. Then call it in the way of 1.1: 1.2: 1.3: 1.4:......) to judge the last partition separator of the first hard disk, then convert it into a drive letter, and MD to establish. Or make a self-extracting empty folder package, copy it over and release it automatically!
The second method is basically similar, so I won't go into details!
|
|
2007-2-11 19:06 |
|
|
0451lym
高级用户
   
积分 760
发帖 357
注册 2005-10-10
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
如果想深入了解请分析XUSEN的作品,启动机器分析分区符的时间大概是30秒!
或者看看最近我和llztt1讨论的分区盘符转换讨论的部分帖子!
Last edited by 0451lym on 2007-2-11 at 07:14 PM ]
If you want to know more, please analyze the works of XUSEN. The time to start the machine and analyze the partition separator is about 30 seconds!
Or take a look at some posts from the recent discussion about partition drive letter conversion between me and llztt1!
Last edited by 0451lym on 2007-2-11 at 07:14 PM ]
|
|
2007-2-11 19:12 |
|
|
xsjlai
新手上路

积分 16
发帖 7
注册 2005-12-21
状态 离线
|
|
2007-2-20 09:12 |
|
|
lhteee
中级用户
  
积分 223
发帖 59
注册 2005-5-23
状态 离线
|
|
2007-2-20 14:15 |
|