Jump to content

Count number of folders


Recommended Posts

Another way.............. change it as you wish..

$Path = @DeskTopdir

$search = FileFindFirstFile( $Path & "\*.*")

$Total=0

While 1

$file = FileFindNextFile($search)

If @error Then ExitLoop

if Stringinstr(FileGetAttrib($Path & "\" & $file),"D") then

MsgBox(0,"",$file)

$Total=$Total + 1

endif

WEnd

FileClose($search)

MsgBox(0,"","Total folders in " & $Path & " : " & $Total)

Edited by Rick

Who needs puzzles when we have AutoIt!!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...