count file and if not 0 go on

December 17, 2010 at 11:25:22
Specs: Windows XP
set _b_p_=%~dp0
set _f_p_=#J_IN.J#
set _t_p_=#I_NAMING_BOOK.I#
set _count_file_=%~dp0J-count.txt
pause
set /p _d_=<( find '(dir/b/o:n %_b_p_%%_f_p_%)' /v /c "::")
echo %_d_%
echo =================
if not %_d_%==0 ( call :znext)
pause

See More: count file and if not 0 go on

Report •


#1
December 17, 2010 at 17:24:41
I'm not sure of what your trying to do......


Perhaps:

for /f %%a in (' dir/b/o:n "%_b_p_%%_f_p_%" ^| find /v /c "::" ') do set _d_=%%a


Report •

#2
December 17, 2010 at 17:36:36
geting the number of file in a dirory in to a val so if there is not a file there I will not start the for

Report •

#3
December 17, 2010 at 17:44:13
If "%_b_p_%%_f_p_%" points to the right place I think this should work.

for /f %%a in (' 2^>nul dir /a-d /b "%_b_p_%%_f_p_%" ^| find /v /c "" ') do set _d_=%%a


Report •

Related Solutions


Ask Question