Sign in to follow this  
Followers 0
Marius

stuck with _FileReadToArray

4 posts in this topic

#1 ·  Posted (edited)

__FileListToArray

What is maximum possible number of files to list to array?

I have a folder with 5000 files and __FileListToArray won't work in this folder. B)

Any ideas how to list a 5000 files to array?

Edited by Marius

Marius back in da hood! :)

Share this post


Link to post
Share on other sites



anyone?


Marius back in da hood! :)

Share this post


Link to post
Share on other sites

autoit just wont create an array. anyway, I found a solution:

Func _FileSearch($s_Mask = '', $i_recurse = 1)

Local $s_Command = ' /c dir /B "'

If $i_recurse <> 1 Then $s_Command = ' /c dir /B /S "'

Local $s_Buf = '', $i_Pid = Run(@ComSpec & $s_Command & $s_Mask & '"', @WorkingDir, @SW_HIDE, 2)

ProcessSetPriority($i_Pid, 5)

While Not @error

$s_Buf &= StdoutRead ($i_Pid)

WEnd

Return StringSplit(StringTrimRight($s_Buf, 2), @CRLF, 1)

EndFunc;==>_FileSearch

Tried this and everything went ok.


Marius back in da hood! :)

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