Sign in to follow this  
Followers 0
tony01

script that will print out Directories and subdirectories

5 posts in this topic

Hi Everybody:

Does anyone have a script that will print out directories and subdirectories from a given directory?

( I don't want to print files, print just dirs and subdirs).

Thanks

Tony. :P

Share this post


Link to post
Share on other sites



Use RunWait to execute the DOS dir command ..

dir _target_folder_ /s /b /ad > output.txt

HTH :P

Share this post


Link to post
Share on other sites

You may find something to help you Here



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

It works.

I like the dos command : dir _target_folder_ /s /b /ad > output.txt,

thank you trids. :P

Short, Fast and clean.

Thank you cameronsdad for the long version.

Cheers

Tony

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