I want to get the number of files modified before 10 days to a variable. I can get number of files using
forfiles /P "D:\files" /S /D -10 | find /c /v ""
But when i try to assign it to a variable using FOR it gives error. Command I used in FOR is
FOR /F "delims=" %i IN ('forfiles /P "D:\files" /S /D -10 | find /c /v ""') DO set today=%i
It actually works fine when I remove | find /c /v ""