|
Post by ednt on Mar 9, 2023 9:53:39 GMT 1
Hi,
I need to check if a directory exists. This can be done by
? FILE('C:\TMP\NUL')
But it does not work. According to the documentation it should work from DOS 3.0
With ADIR() and ASCAN() I can build a workaround, but this takes more time for the check.
I use vDos 2022.05.01
Any idea why FILE() fails?
Bernd
|
|
|
Post by Jos on Mar 9, 2023 11:26:11 GMT 1
Ralf Brown's Interrupt List (http://www.ctyme.com/intr/rb-2977.htm) states:
Notes: For search attributes other than 08h, all files with at MOST the specified combination of hidden, system, and directory attributes will be returned.
Although [path\]NUL is at first eventually regarded ‘found’, it’s then dropped if the device attribute (40h) was not included in the search attributes. The device attribute is however essentially non-existent in file searches. For the next vDos version I changed the test to only attribute 08h (volume) being set. FoxPro FILE() sets the search attributes to 0.
Jos
|
|