I don't know whether this is intentional DO behavior. The documentation states that the /D option (specify a starting directory) is for use with the /S option (traverse subdirectories). The /D option may be specified without the /S option, without error. However, in this case it is ignored. In other words, there's no way to say "start in this other directory, but do not traverse subdirectories." WAD or not?
It's easy enough to guard against with surrounding code, but I thought I'd ask.
[C:\batch]do file in /d"h:\" image* (echo %file (in %_cwd)) imagehelp.btm (in C:\batch) [C:\batch]do file in /d"h:\" /s image* (echo %file (in %_cwd)) Image1.jpg (in H:\) Image10.jpg (in H:\) image2.jpg (in H:\) image20.jpg (in H:\)