FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour DirectoryRecurse array empty
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
DirectoryRecurse array empty
Posted: 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 (fw): Select all Collapse
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
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: DirectoryRecurse array empty
Posted: Wed Nov 02, 2011 04:50 PM
Try

Code (fw): Select all Collapse
afiles = DirectoryRecurse( "c:\WINDOWS\*" )


EMG
Posts: 159
Joined: Wed Mar 28, 2007 01:19 PM
Re: DirectoryRecurse array empty
Posted: Wed Nov 02, 2011 05: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

Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: DirectoryRecurse array empty
Posted: Wed Nov 02, 2011 09:45 PM

Enrico,

Same result :(

Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite

Continue the discussion