Page 1 of 1
DIRECTORYRECURSE()
Posted: Thu Feb 24, 2011 3:15 pm
by MarcoBoschi
Hi,
With this first command
aDir := DIRECTORYRECURSE( "*.*" )
I do not load into aDir array files without extensions
in this way instead
aDir := DIRECTORYRECURSE( "*" )
all files are loaded
Is it normal?
best regards
marco
Re: DIRECTORYRECURSE()
Posted: Thu Feb 24, 2011 7:14 pm
by Enrico Maria Giordano
Works fine for me using latest xHarbour from SVN. This is a sample:
Code: Select all
#include "Directry.ch"
FUNCTION MAIN()
LOCAL aDir := DIRECTORYRECURSE( "*.*" )
LOCAL i
FOR i = 1 TO LEN( aDir )
? aDir[ i, F_NAME ]
NEXT
INKEY( 0 )
RETURN NIL
EMG
Re: DIRECTORYRECURSE()
Posted: Fri Feb 25, 2011 9:44 am
by frose
Marco,
can confirm this behaviour and I think it's logical, because the pattern "*.*" is not suitable for files without extensions in opposite to "*"
Re: DIRECTORYRECURSE()
Posted: Fri Feb 25, 2011 4:58 pm
by MarcoBoschi
frose,
please try these two different commands from any folder in any volume
DIR *.* /S
DIR * /S
and count the files listed
note that the numbers of files listed are the same.
In a program these two different ways to call the same function
aDir := DIRECTORYRECURSE( "*.*" )
aDir := DIRECTORYRECURSE( "*" )
return different array if are present files without extension
Something is not working and
EMG confirms that in the latest version this problem has been fixed
bye
Re: DIRECTORYRECURSE()
Posted: Fri Feb 25, 2011 5:27 pm
by Enrico Maria Giordano
Sorry, I was wrong. I didn't have any file without extension.
EMG
Re: DIRECTORYRECURSE()
Posted: Fri Feb 25, 2011 6:41 pm
by frose
Marco,
yes, you are right. The default pattern is "*.*" for all available files (and directories), also for files with no extension!
It works for Directory() but for DirectoryRecurse() the files with no extension are NOT included!
Re: DIRECTORYRECURSE()
Posted: Sun Feb 27, 2011 1:34 pm
by andijahja
MarcoBoschi wrote:frose,
please try these two different commands from any folder in any volume
DIR *.* /S
DIR * /S
and count the files listed
note that the numbers of files listed are the same.
In a program these two different ways to call the same function
aDir := DIRECTORYRECURSE( "*.*" )
aDir := DIRECTORYRECURSE( "*" )
return different array if are present files without extension
Something is not working and
EMG confirms that in the latest version this problem has been fixed
bye
Yes, I confirm this is a bug and it has been corrected now.
Re: DIRECTORYRECURSE()
Posted: Fri Sep 16, 2011 10:16 am
by Baxajaun
Hi Andy,
has been corrected ?
Best regards,
Felix