DirectoryRecurse array empty

DirectoryRecurse array empty

Postby Marc Vanzegbroeck » Wed Nov 02, 2011 11:58 am

Hi,

I want to try the DirectoryRecurse() function, but I always get an empty array.
This is the testcode
Code: Select all  Expand view
func dirtest()
   local aFiles
    afiles = DirectoryRecurse( "c:\WINDOWS\*.*" )
    msginfo(len(aFiles))
 return
 


If i use a directory with less files then c:\WINDOWS, I get faster the '0' message. So I think it search the directory, but always an empty array.

I'am still using xHarbour Compiler build 0.99.71 (SimpLex). Maybe, there was a problem it that release with DirectoryRecurse()

Thanks,
Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: DirectoryRecurse array empty

Postby Enrico Maria Giordano » Wed Nov 02, 2011 4:50 pm

Try

Code: Select all  Expand view
afiles = DirectoryRecurse( "c:\WINDOWS\*" )


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8712
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: DirectoryRecurse array empty

Postby Euclides » Wed Nov 02, 2011 5:21 pm

Hi to all!
I tested the above program with FW 10.9 in Windows XP SP3 and found some strange results:

Harbour 2.1.0beta2 (Rev. 15490) - creates an Array with 256 entries

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6741) - creates an Array with 8873 entries

dir c:\windows\*.* /s - shows 15392 files

dir c:\windows\*. /s - shows 1588 files

To see what is going on, I changed the MsgInfo by MsgList and got GPF both in Harbour and xharbour.
Running the program on "C:\windows\*." (forders only) creates an empty Array
Have fun, and regards
Euclides
User avatar
Euclides
 
Posts: 156
Joined: Wed Mar 28, 2007 1:19 pm

Re: DirectoryRecurse array empty

Postby Marc Vanzegbroeck » Wed Nov 02, 2011 9:45 pm

Enrico,

Same result :(

Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 97 guests