Sign in to follow this  
Followers 0
goldenix

[Solved] DirGetSize

4 posts in this topic

#1 ·  Posted (edited)

I cant use DirGetSize cuz it returns filecount from all subfolders in current directory

is there any way to get the file count from only scriptdir that has subfolders in it? or I need to use for-next to count all files separately?

Edited by goldenix

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites



Use the 3 flag to turn off recursive mode.

$aSize = DirGetSize("C:\WINDOWS", 3)

Share this post


Link to post
Share on other sites

Use the 3 flag to turn off recursive mode.

$aSize = DirGetSize("C:\WINDOWS", 3)

works thanx, they should edit the help file for next autoit release. cuz there is no such thing like flag 3 in the help file

$filecount  = DirGetSize(@ScriptDir,3)
    $filecount  = $filecount[1]
    ConsoleWrite($filecount & @CRLF)
    Exit

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites

It's in the documentation.

[optional] this flag determines the behaviour and result of the function,

and can be a combination of the following:

0 = (default)

1 = Extended mode is On -> returns an array that contains extended information (see Remarks).

2 = Don't get the size of files in subdirectories (recursive mode is Off)

Anytime it says "can be a combination", you add up all the options you want. So flag 3 is a combo of 1 and 2.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0