You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are two separate issues when using IF EXIST ?:\NUL. I'm lazy and wrote up a info text file over at https://fd.lod.bz/redist/testing/devNUL/ that I will just paste in here. The test batch and result files referenced in the text can be found there as well.
Although this behavior deviates from that of other drives,it is
consistent with the behavior of MS-DOS 6.22 using MSCDEX. There is
the possibility that correcting this issue has the potential to break
compatibility with any program that may rely on this behavior.
Issue 2:
Testing for the existence of a non-existing drive returns unreliable
results. This seems reproducible based on the current working directory
when the test is performed. For each test, a copy of the test.bat was
placed in the current working directory.
result0.htm was run with the current drive and directory on an internal
local drive (C:). It incorrectly shows that the non-existing drive (P:)
was found.
result1.htm was run with the current drive and directory on an remote
network share (N:). It correctly shows that the non-existing drive (P:)
was not found.
Switching back and forth between drive C: and N: and running the TEST.BAT consistently produces the same results.
The text was updated successfully, but these errors were encountered:
this appears to be a kernel bug, but still doing some more verification.
IF EXISTS path command
essentially is
if findfirst(path) is successful (returns 0) then do command
where findfirst (SFN version) is essentially an INT21h with AX=0x4E00 and DS:DX=path returning AX
Hi,
Here are two separate issues when using
IF EXIST ?:\NUL
. I'm lazy and wrote up a info text file over at https://fd.lod.bz/redist/testing/devNUL/ that I will just paste in here. The test batch and result files referenced in the text can be found there as well.NUL Device Existence Test
https://fd.lod.bz/redist/testing/devNUL/
2023-05-23
This test reveals two separate issues:
Issue 1:
Testing for the existence of a path by using the
NUL
device does notwork on CD/DVD drives or Network Shares. The result is always FALSE.
IF EXIST N:\NUL ECHO Drive N: exists.
See either result0.htm or result1.htm.
Although this behavior deviates from that of other drives,it is
consistent with the behavior of MS-DOS 6.22 using MSCDEX. There is
the possibility that correcting this issue has the potential to break
compatibility with any program that may rely on this behavior.
Issue 2:
Testing for the existence of a non-existing drive returns unreliable
results. This seems reproducible based on the current working directory
when the test is performed. For each test, a copy of the test.bat was
placed in the current working directory.
result0.htm was run with the current drive and directory on an internal
local drive (C:). It incorrectly shows that the non-existing drive (P:)
was found.
result1.htm was run with the current drive and directory on an remote
network share (N:). It correctly shows that the non-existing drive (P:)
was not found.
Switching back and forth between drive C: and N: and running the
TEST.BAT consistently produces the same results.
The text was updated successfully, but these errors were encountered: