Jump to content

script that will print out Directories and subdirectories


 Share

Recommended Posts

You may find something to help you Here


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

You may find something to help you Here

mine is on the list linked to, but i modified the code a little to suit your purpose... But i think the dos dir method mentioned may be faster...

$tosearch = "C:"
$output = FileOpen("c:\filelist.txt",2)
$start = TimerInit()
RecFileSearch($tosearch)
FileClose($output)
MsgBox(0,"done","it only took " & int(TimerDiff($start)/1000) & " seconds")
Func RecFileSearch($current)
    Local $search = FileFindFirstFile($current & "\*.*")
    While 1
    Dim $file = FileFindNextFile($search)
    If @error Or StringLen($file)<1 Then ExitLoop
    If StringInStr(FileGetAttrib($current & "\" & $file),"D") And ( $file <> "." Or $file <> ".." ) Then 
        RecFileSearch($current & "\" & $file)
        FileWriteLine($output,$current & "\" & $file & "     " & DirGetSize($file))
    WEnd
    FileClose($search)
EndFunc
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...