<Script>
  id,%ID%,377;
  grp,%GN%,script;
  str,Source,// Folders size sorted by: files size#2C descended (sorted only in output file!)#0D#0A// Set next variables (parameters):#0D#0A#0D#0A@path='H:\*.*'#3B   // path#2C from which starting analyse of occupied disk space and files count#0D#0A@maxlevel='3'#3B    // count of folders levels included in output file (Folder size calculation is made from all levels !!)#0D#0A@csvfile='C:\meno_suboru.csv'#3B  // output file name#0D#0A#0D#0A@includedirfilessize='NO'#3B#0D#0A#0D#0A// Don't edit next lines!#0D#0A// function#0D#0A#0D#0ASection( 'Settings'#2C #0D#0AStrValue( 'Path'#2C @path ) + \n + #0D#0AIntValue( 'MaxLevel'#2C @maxlevel ) + \n +#0D#0ABoolValue( 'IncludeDirFilesSize'#2C @includedirfilessize ))#3B#3B#0D#0A#0D#0Adirsizedetailed(@path#2C''#2C@maxlevel)#3B#0D#0A#0D#0A// report to CSV#0D#0A#0D#0AReportTXTEx(#0D#0A'"Path"#3B"Size in B"#3B"Size"#3B"Files Count"#3Cselect Settings#3E#3Cif @IncludeDirFilesSize=Y#3E#3Cselect dirsize.*#3E#3Cselectall /*  sortby: -@TotalSize_B#3E#3Cif @TotalCount=-0#3E#0D#0A"#3C@@Path:\#3E"#3B#3C@@indent:#3B#3B#3B#3E#3C@TotalSize_B#3E#3B"#3C@TotalSize#3E"#3B#3C@TotalCount#3E#3Cif @FilesCount=-0#3E#0D#0A"#3C@@Path:\#3E\."#3B#3C@@indent:#3B#3B#3B#3E#3C@FilesSize_B#3E#3B"#3C@FilesSize#3E"#3B#3C@FilesCount#3E#3C/if#3E#3C/if#3E#3C/selectall#3E#3C/select#3E#0D#0A#3Celse#3E#3Cselect dirsize.*#3E#3Cselectall /*  sortby: -@TotalSize_B#3E#3Cif @TotalCount=-0#3E#0D#0A"#3C@@Path:\#3E"#3B#3C@@indent:#3B#3B#3B#3E#3C@TotalSize_B#3E#3B"#3C@TotalSize#3E"#3B#3C@TotalCount#3E#3C/if#3E#3C/selectall#3E#3C/select#3E#0D#0A#3C/if#3E#3C/select#3E'#2C#0D#0A@csvfile)#3B;
</Script>