amakrkr Posted June 21, 2010 Share Posted June 21, 2010 Hello all, i have searched the forem and help file wondering how could i make a script that reads only directories without other files? _FileListToArray Is a nice function, i am wondering if there is something like _DirectoryListToArray. Or another idea how could i get only directory list for example from c:\. Thank you Link to comment Share on other sites More sharing options...
Mat Posted June 21, 2010 Share Posted June 21, 2010 _FileListToArray("C:\", "*", 2) Notice the flag of 2. Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
Fire Posted June 21, 2010 Share Posted June 21, 2010 (edited) or . RunWait("cmd.exe /c " & "dir /B /AD " & @HomeDrive & "\" & " >"&@TempDir&"\dirs.ini",@ScriptDir,@SW_HIDE) MsgBox(64,"",FileRead(@TempDir&"\dirs.ini")) edit: /B Edited June 21, 2010 by Fire [size="5"] [/size] Link to comment Share on other sites More sharing options...
amakrkr Posted June 21, 2010 Author Share Posted June 21, 2010 Hello all, i have searched the forem and help file wondering how could i make a script that reads only directories without other files?_FileListToArray Is a nice function, i am wondering if there is something like _DirectoryListToArray.Or another idea how could i get only directory list for example from c:\.Thank youThanks mate. I was 100% there must be an option like that to sort out only folders but in help or on forum i havent found it.Script works now. Link to comment Share on other sites More sharing options...
amakrkr Posted June 21, 2010 Author Share Posted June 21, 2010 or . RunWait("cmd.exe /c " & "dir /B /AD " & @HomeDrive & "\" & " >"&@TempDir&"\dirs.ini",@ScriptDir,@SW_HIDE) MsgBox(64,"",FileRead(@TempDir&"\dirs.ini")) edit: /B Thx for replay. But 1st option suits my script better since i have to change only 1 argument in function ty Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now