Apropos the accepted answer to Test failure of DOS del D:\folder\*.ext , where is the official documentation saying that if exist FileName can accept a wildcard in FileName?
Asked
Active
Viewed 141 times
0
-
1) you mean Windows, **not** DOS 2) `if exist`, **not** `if exists` 3) Where is your question? – Endoro Jun 10 '13 at 04:40
-
[Image from MDSOS days](http://oi41.tinypic.com/35kvoyc.jpg) – foxidrive Jun 10 '13 at 10:30
-
Endoro "3) Where is your question?" See above. – ChrisJJ Jun 11 '13 at 12:45
-
foxidrive "Image from MDSOS days", thanks but that's behaviour, not official documentation. And behaviour that (in absence of those docs) is undefined. – ChrisJJ Jun 11 '13 at 12:47
-
But why must you have proof that the paint is wet? – foxidrive Jun 12 '13 at 07:35
1 Answers
2
I doubt any official documentation exists, though I cannot prove a negative. I certainly have never seen any official documentation stating IF EXIST supports wildcards in file names (but not folder paths)
There is probably some documentation for an underlying system call that explains the rules, but probably nothing that states IF EXIST uses the system call.
But this situation is the norm for anything related to batch programming. One of the reasons cmd.exe / batch has such a poor reputation is that it is so poorly documented. Many commands have multiple undocumented features/behaviors that experienced batch developers have discovered and shared over time.

dbenham
- 127,446
- 28
- 251
- 390