Jump to content

Recommended Posts

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! :)
Posted

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! :)

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
  • Recently Browsing   0 members

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