0

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?

Community
  • 1
  • 1
ChrisJJ
  • 2,191
  • 1
  • 25
  • 38

1 Answers1

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