I got the Task to do a Kixtart-Program which shows All Folders and they Sizes,
I was searching in this Forum and found a Code for the Folder Size, it works but I want to know what is happening.

 Code:
$Directory = "%windir%"
$DirSize = fnGetFolderProp($Directory,Size)
$DirSizeKB = $DirSize / 1024
$DirSizeMB = $DirSizeKB / 1024
$DirSizeGB = $DirSizeMB / 1024

$msg = MessageBox('The ' + $Directory + ' directory is ' + $DirSizeMB + 'MB','Notice',64)

Function fnGetFolderProp($sFldr,$sProp)
    Dim $objFSO, $objFldr, $nul
    $objFSO = CreateObject("Scripting.FileSystemObject")
    If Not VarType($objFSO)=9 Exit 1 EndIf
    $objFldr = $objFSO.GetFolder($sFldr)
    If Not VarType($objFldr)=9 Exit 3 EndIf
    $nul=Execute("$$fnGetFolderProp = $$objFldr."+$sProp)
    If VarType($fnGetFolderProp)=0 Exit 87 EndIf
EndFunction"


Code is from:
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=161567