Using opendir() with a filePro file name

Mike Schwartz (PC Support & Services, Appleton, WI) mschw at athenet.net
Thu Apr 6 07:48:46 PDT 2006


> I assume that something isn't working, but you never said what.  Can
> you describe the problem that you are having?  The above should work
> just fine, assuming the filename you give exists, and there are prc
> files for that file.
>
> KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>

     I figured it out.  Just a case of late-night programming brain fade
and lack of experience with "opendir".  I needed to put a "closedir"
command into the loop, even if I didn't find any PRC's.

     I should have included a code snip.  Here's one that works:

 12   If:
      Then: lc="1"          'Reset loop counter
 13  -------   -   -   -   -   -   -   -   -   -
loop2 If:
      Then: gg(32,*)=""{files(lc); fc=opendir("PRC_MASK",gg)
 14  -------   -   -   -   -   -   -   -   -   -
      If:   fc ge "1" or lc ge (bb-"1") 'Found prcs, or no more files
      Then: show "@Found" <fc <"procs in filePro file:" <gg; end
 15  -------   -   -   -   -   -   -   -   -   -  -   -   -   -
      If:   fc
      Then: zd=closedir(); lc=lc+"1"; goto loop2

Thanks to everybody who responded!

Mike




More information about the Filepro-list mailing list