Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Simple script to find files and give file size sum

$
0
0
Hello all,
I'm kinda stuck on a very simple task.
I have this small piece of code to find files and report the file size.
In the end, Im going to use it to search specific folders, exclude certain file extensions and report.

But I'm drawing a blank on how to give the total sum of the FileGetSize while running it through.
Please help :-)

#include <Array.au3>
#include "RecFileListToArray.au3"
$aList = _RecFileListToArray(@UserProfileDir&"\documents", "*.*", 1, 1, 0, 2)
For $i = 1 To $aList[0]
Local $iFile = $aList[$i]
MsgBox(4096, $iFile, $iFile)
$iSize = FileGetSize($aList[$i])
MsgBox(4096, $iSize, $iSize)
Next


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>