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-08-18 19:00
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » Is there a DOS command to determine if a file exists under NTFS in the format of X:Y\PATH\FILE? View 2,829 Replies 29
Original Poster Posted 2007-02-08 11:08 ·  中国 河南 开封 教育网
中级用户
★★
Credits 214
Posts 94
Joined 2007-01-11 10:39
19-year member
UID 76165
Gender Male
Status Offline
Brother 0451lym said that as old hands all know, but I searched numerous old posts and didn't find it, so哪位老鸟 can give a hint哈?

The key step to achieve the correct conversion of messy drive letters under NTFSDOS to X:Y form, once passed, the convenience of GHOST maintenance disk will be improved by one level.

Previously, Brother TERSE posted a thread, and the discussion result was that by skipping this step, directly using NTFS drive letters for GHOST without exiting the NTFS driver, but it was found that neither NTFSDOS nor IFS was stable enough, especially after IFS was started, many commands couldn't be used.. so I suggest to use the NTFS driver to get necessary information and then exit it to perform clean GHOST.
Floor 2 Posted 2007-02-08 13:08 ·  中国 黑龙江 哈尔滨 电信
高级用户
★★★
Credits 760
Posts 357
Joined 2005-10-10 22:33
20-year member
UID 43332
Status Offline
Hehe, a few months ago, I was just like you, wasting many days on the stability of NT drivers. In the end, I still chose IFS. There are many versions of IFS drivers, not all of them are stable. Look for it, there's only one version that's stable!
Because I use the desktop system of UCDOS, after uninstalling the NT driver, it can't be mounted, I can only restart and then mount it, which is frustrating.
So my solution is to mount it and not take it down, I can only find the most stable version, there's no way to force it out!
Floor 3 Posted 2007-02-08 21:48 ·  中国 河南 开封 教育网
中级用户
★★
Credits 214
Posts 94
Joined 2007-01-11 10:39
19-year member
UID 76165
Gender Male
Status Offline
Well, then does that mean that with IFS hanging, we can use the GHSTSTAT.TXT generated by GHOST -DD to analyze and convert the drive letter of the NTFS partition to the X:Y format??
Hehe, it seemed simple before, but it's so troublesome originally
Floor 4 Posted 2007-02-08 22:15 ·  中国 黑龙江 哈尔滨 电信
高级用户
★★★
Credits 760
Posts 357
Joined 2005-10-10 22:33
20-year member
UID 43332
Status Offline
The analysis of the GHSTSTAT.TXT generated by GHOST -DD is only a part. It is also necessary to use actual commands to test the authenticity, and only after confirming it is correct can it be converted into the format of X:Y!

Because if the partitions in a hard disk are completely chaotic NTF32 and NTFS formats, then it is not easy to judge. If it is a dual hard disk, it will be more complicated. If you want to do it, you must be accurate, otherwise it is easy to make a fool of yourself...

Therefore, it is necessary to repeatedly and double - judge with DOS commands and command format software for identifying NTFS++ and the report analysis judgment of software such as GHOST -DD. Finally, it is the format we want. It is troublesome to say, but the program operation is only between 5 seconds and 40 seconds.
Floor 5 Posted 2007-02-08 22:27 ·  中国 黑龙江 哈尔滨 电信
高级用户
★★★
Credits 760
Posts 357
Joined 2005-10-10 22:33
20-year member
UID 43332
Status Offline
I used the following several small commands:
1. The command to identify the X:Y\PATH\FILE format (main, without it, the correct answer cannot be analyzed)
2. The command to identify the NTFS letter drive letter (main, with it, the judgment steps will be greatly reduced and time will be saved)
3. The command to identify the optical drive drive letter (optional, not very useful)
4. GHOST -DD report analysis (main, can reduce judgment steps and save time)
5. DOS internal command combined with trial (main, the answer repeatedly verified will be the most accurate)

All my methods are above!

[ Last edited by 0451lym on 2007-2-8 at 10:29 PM ]
Floor 6 Posted 2007-02-08 23:20 ·  中国 河南 开封 教育网
中级用户
★★
Credits 214
Posts 94
Joined 2007-01-11 10:39
19-year member
UID 76165
Gender Male
Status Offline
omnifs.exe BTIni.exe can both be accessed in the format X:Y\PATH\FILE, but they are too large, I don't want them. I don't know how to recognize the NTFS drive letter command. That FUNC command can list all existing drive letters (including the drive letters after loading NTFS). I found another IFS, modified by Brother Wen, which can exit normally, but GHOST2003 can start normally, but GHOST11 can't. And I tried several versions of IFS and can't COPY CON SS, saying can't find the CON file.... If too many steps are needed to judge the real X:Y path and it's difficult to ensure whether it's correct (the loss of wrong judgment is hard to predict), then I want to give up the automated batch processing, directly browse and search for the found GHO files, then exit NTFS and Chinese support, etc., start GUI, and manually find each partition according to the found GHO file path.
Floor 7 Posted 2007-02-11 10:33 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Downloaded a dpit, but it shows that the partition format is not ideal. The second hard drive shows 1:X. Then downloaded lmod.com and wanted to use it with GHOST -DD find, but I don't know how to use it specifically. So naive! Those who know, please share how to use it?

Dirt search can control the search layer, which is quite good, but it can't search X:Y. Oh no!

Now I can only manually GHOST. Anyway, GHOST supports NTFS format. FAT can be automatically GHOST. Now changing the drive letter to X:Y, and searching is another problem. Oh well~~

[ Last edited by terse on 2007-2-11 at 10:44 AM ]
Floor 8 Posted 2007-02-11 10:58 ·  中国 河南 开封 教育网
中级用户
★★
Credits 214
Posts 94
Joined 2007-01-11 10:39
19-year member
UID 76165
Gender Male
Status Offline
TERSE, you previously posted a thread, and a user named XUSEN replied to you. He is the author of the Deep Startup Disk. He has implemented full-disk search using IFS + PSI.EXE + batch processing. After testing, no errors in analyzing the hard disk partition structure were found. The only shortcoming is that he used DIR for searching, and I have modified his batch processing to use DIRT instead.

I only discovered XUSEN's work after searching for your posted thread. It's strange, why didn't you notice it? He even posted a picture for you, heh heh

If you search online for "Deep Startup Disk XUSEN", you can easily download it. XUSEN's batch processing is quite good, and with a simple modification to his search batch processing, it works very well.

Also, I hope XUSEN can improve it to make it more convenient for everyone, heh heh
Floor 9 Posted 2007-03-28 14:34 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Originally posted by llztt1 at 2007-2-11 10:58:
TERSE, you previously posted a thread, and the netizen XUSEN replied to you. He should be the author of the Deep Boot Disk. He has realized full-disk search using IFS+PSI.EXE+batch processing. After testing, no parsing hard...

Tried XUSEN's USB disk boot, and my original hard disk is recognized as the first hard disk, while my original hard disk is the second hard disk under DOS. Now I use GDISK, which can be converted to X:Y. I don't use it for searching. In the GDISK information, it can be converted to X:Y.
Now the problem is that after loading IFS, why can't GDISK still see the NT drive letter? Do you know the usage of PSI?
Floor 10 Posted 2007-03-29 02:23 ·  中国 河南 开封 教育网
中级用户
★★
Credits 214
Posts 94
Joined 2007-01-11 10:39
19-year member
UID 76165
Gender Male
Status Offline
GDISK is also too big... more than 1M

To convert the drive letters and hard disk partition numbers under DOS, several software are needed. The new version of XUSEN uses batch processing + IFS + AEFDISK to complete this conversion. However, the information obtained is not as detailed as the original version using batch processing + IFS + PSI. For example, the remaining capacity of each partition, and PSI can also fully display the unallocated disk space. But PSI also has its own disadvantages, that is, it is also very large in size and has a long loading time. Both methods have advantages and disadvantages. For specific usage, just look at XUSEN's batch processing.

Regarding the search problem, currently, it is generally to directly search for the DOS self-recognized drive letter or the drive letter after IFS is loaded, and then convert the drive letter to the form of X:Y; the command to directly search for X:Y is really hard to find. GRUB can do it, which can search partitions of various partition formats in the form of paths, but......

In actual use, it is found that AEFDISK has a problem. That is, if I boot from the CD-ROM --- GRUB --- floppy disk scene --- AEFDISK, I find that the parameter for getting the current number of hard disks of AEFDISK cannot work normally, an error will be reported, and it is forced to be displayed on the screen. I don't know if other friends have such a situation.
Floor 11 Posted 2007-03-29 03:50 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Now it seems to me that the XUSEN version at least can't be used for USB flash drive booting on my machine (when the USB flash drive is regarded as the first hard disk). Other situations haven't been tried!
From the situation when I used GDISK (GDISK is really too big... 321KB), it is indeed a bit slow, but there are no errors. When using GHOST, you can first confirm how many hard disks are on the machine and then select the hard disk you need to operate, so this should not make mistakes. You can select the disk you want to operate before backing up and restoring. Personally, I think it's also good. At least it can avoid mistakes when the USB flash drive is the first hard disk. Now the problem to solve is how to make GDISK display and load the NT drive letter after IFS! Please help!
The XUSEN version has been tried several times and can't recognize my original hard disk as the second, so it leads to being unable to GHOST. The hard disk detection and search are good, but why does it recognize my second hard disk as the first? Still, let's continue to see.
Floor 12 Posted 2007-03-29 09:09 ·  中国 河南 开封 教育网
中级用户
★★
Credits 214
Posts 94
Joined 2007-01-11 10:39
19-year member
UID 76165
Gender Male
Status Offline
I haven't used a USB flash drive yet, I've only used CDs or hard drives to boot large floppy disk images with GRUB, so I really don't understand USB flash drive booting issues. It seems that the same USB flash drive will have completely different results when booted under different boot modes in the BIOS settings. One mode will be the C drive and the other will be the A drive?

The 321K GDISK, which version are you using?? I have version 11 here, and it seems it can't display the drive letters after loading IFS.

You can also test XUSEN's USB flash drive version to analyze if there are regularities in the hard drive, and if it's just a minor bug, just fix it.
Floor 13 Posted 2007-03-29 10:19 ·  中国 黑龙江 哈尔滨 电信
高级用户
★★★
Credits 760
Posts 357
Joined 2005-10-10 22:33
20-year member
UID 43332
Status Offline
Hehe, it's very easy to solve!
Check if there is a specific file in C:, such as xmsdsk.exe. If it exists, then replace 1.1 with 1.2
Floor 14 Posted 2007-03-29 12:47 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Originally posted by llztt1 at 2007-3-29 09:09:
I have never used a USB flash drive. I only use CD-ROM or GRUB on the hard disk to boot large floppy disk images, so I really don't understand USB flash drive booting issues. It seems that the same USB flash drive will have... after booting under different boot modes set in the BIOS...

It's not a BIOS setting issue, but a motherboard issue. There is currently no good solution. XUSEN's detection of the hard disk treats my second hard disk as the first hard disk. Also, it treats the first partition of my second disk as a FAT partition and moves it to the back. That would be difficult for conversion, unless the primary partition can have characteristic judgment, and I didn't look at the others in detail.
The 321KB gdisk was downloaded from the internet. I don't know what version it is.
Originally posted by 0451lym at 2007-3-29 10:19:
Hehe, it's very easy to solve!
Check if there is a specific file in C:, such as xmsdsk.exe. If there is, then replace 1.1 with 1.2

My current USB flash drive is replacing C: with 2:1? The problem is not X:Y, but the key issue is what can be used to see the drive letter after loading IFS.
Using lmod and STRINGS can solve the drive letter conversion. As for the partition information analyzed by GDISK being one bit larger than the actual one, it can also be solved with STRINGS. I'm currently looking around for something that can correctly display the drive letter after loading IFS. Do you have any?
Floor 15 Posted 2007-03-29 21:41 ·  中国 河南 开封 教育网
中级用户
Credits 204
Posts 44
Joined 2003-08-08 00:00
23-year member
UID 8224
Gender Male
Status Offline
Regarding the GHOST automatic batch processing, the three of us discussed it on the forum two months ago, heh heh.

Regarding the drive letter conversion, your current idea is the same as my pursuit back then. Now it seems that PSI is feasible, but the drawbacks of it I mentioned above. There is also a DSPT, whose author promised to develop a version that tries to load the drive letters after IFS or NTFSDOS, but I haven't seen the author update for a long time, so we just have to wait.

Regarding AEFDISK and DSPT, I suspect they both read BIOS parameters to view the hard drive, and I always feel it's not reliable.
Forum Jump: