opendir() - It returns list of files or the file count - Which is it?

fp at casabellagallery.com fp at casabellagallery.com
Sun Sep 2 20:38:02 PDT 2007


I've known of this function but have never used them and since
I am working on a little project I thought I could give it a shot.

Reading the F9 help no much information is given.  I went to online 
help and just about the same.  The online help, however, gives me 
mixed signals.  

N = opendir("PRC_MASK")
Creates a list of all prc files for the current file.

While the lower paragraph on the same page it says

Description:
OPENDIR() allows you to do the equivalent of a DOS "DIR" or UNIX "ls" command. 
It returns the number of files in a filePro directory that meet the criteria.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Notice the "It returns the number of files ..." which is not the same as
"a list of all files ..."

I put it to the test, I set a dummy variable zx=opendir("prc_mask"), put the
variable on a screen all by itself and all I got was a number 18 which took
about 3 1/2 lines to display (possibly because variable is not defined).  And
sure enough, I happen to have 18 prc.* files in that file (that worked).

That said, how do I get opendir() to give me the "list of files" and not 
"the number of files"?

Regards,


---
Jose Lerebours
954  559  7186
http://www.fpgroups.com


More information about the Filepro-list mailing list