Page 1 of 1

RETRIEVING THE COMBINED SUM OF A SPECIFIED FILE EXTENSION...

Posted: 24 Mar 2009 13:00
by *SCRIPTER*
I was wondering how one might go about retrieving the combined
sum of a specified file extension in a specific directory.
So, the combined size of say, all the .dll files in the system32 folder.
Not how many dll's, but the combined size of those dll's.
Ideas?

Posted: 24 Mar 2009 13:26
by JustJoe
Greetings:

for /F loop with dir path\*.dll /N
Process each line looking for the unique signature IE: .dll in your usecase
if found then
cheery pick the size field from the line
set /a totalsize+=filesize
endif
endfor


cheers