On Mon, 4 Apr 2005 15:47:36 +0400, "Dmitry Anikin" <(E-Mail Removed)> wrote:
>Putting your thoughts to paper really improves thinking,
>I've found a nicer way:
>
>for /f %%i in ('dir /a /b folder') do goto notempty
>
>And also it checks hidden files.
>But still, I'd like something which could be used in an IF
set pipe="%TEMP%\Found_%RANDOM%.TMP"
dir /a /b folder>%pipe% 2>&1
set OK=Y
for /f "Tokens=*" %%f in ('type %pipe%^|FINDSTR /B /L /C:"File Not Found"') do set OK=N
if "%OK%" EQU "N" goto MT
Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com