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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
*SCRIPTER*
Posts: 18
Joined: 16 Mar 2009 08:18
Location: N/A
Contact:

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

#1 Post by *SCRIPTER* » 24 Mar 2009 13:00

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?

JustJoe
Posts: 6
Joined: 17 Mar 2009 12:54

#2 Post by JustJoe » 24 Mar 2009 13:26

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

Post Reply