What about this:
forfiles /P "%LocalFolder%" /M "*" /D +0 /C "cmd /C if @isdir==FALSE echo _" | find /C "_"
Or this if you want to include sub-directories:
forfiles /S /P "%LocalFolder%" /M "*" /D +0 /C "cmd /C if @isdir==FALSE echo _" | find /C "_"
How it works:
forfiles returns a _ character for each file modified today (/D +0 means modified on date of today or newer);
- the
if query avoids directories to be regarded/counted;
find counts (/C) the amount of returned lines containing _ characters;
To assign the resulting number to a variable, use a for /F lop:
for /F %%N in ('forfiles /P "%LocalFolder%" /M "*" /D +0 /C "cmd /C if @isdir==FALSE echo _" ^| find /C "_"') do set "NUMBER=%%N"
echo %NUMBER%
Or:
for /F %%N in ('forfiles /S /P "%LocalFolder%" /M "*" /D +0 /C "cmd /C if @isdir==FALSE echo _" ^| find /C "_"') do set "NUMBER=%%N"
echo %NUMBER%
Note the escaped pipe ^|.