OPENDIR, NEXDIR, CLOSEDIR issue (GRX)

Chris Sellitto sellich at guaranteedreturns.com
Mon Jul 20 13:22:51 PDT 2009


All,
filePro® 5.0.14
Windows XP

After 15 years of programming filePro®, this is the first time I am 
experimenting with the OPENDIR(), NEXTDIR(), and CLOSEDIR() commands.

I have been having some problems with them.  What I want to accomplish is to
build an array of .csv files from a NON-filePro® folder.  Below I have the 
process that I have been playing around with.  I know it may not be the best
way of programming it, but it is only a test.

My issue:

When I execute line 204 it will give me all .CSV files in
the folder in my array,(great, that worked).

When I uncomment and execute line 205 (I already commented 204), I get no
files in my array even though there are ONLY 2 .csv files that exist in this
folder.

When I uncomment line 206, I get all the files in that folder in my array.

Does anyone see what I am doing wrong.  Why would it work in some cases, and
not others?  Any help is always appreciated.

202  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
@keyT  ◄ If:                     							                                        
       Then: dim flelst(100)(112,*)                                            
203  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:                                                                   					                        
       Then: y(3,.0)="0";rr(3,.0)="1"                                          
204  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:      'local drive containing an assortment of file types (.csv, .txt, .zip)                                                                      
       Then: qq=opendir("*.csv","c:\e-mails")                                  
205  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:      'network folder containing only 2 .csv files                                                                                 
       Then: 'qq=opendir("*.csv","\\server1\d$\FTPFOLDER\extranet\DMLSSFTP")       
206  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:      'network drive containing an assortment of file types (.pdf, .exe, .ppt)                                                                                          
       Then: 'qq=opendir("*.*","\\server1\d$\FTPFOLDER\extranet\rob")        
207  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
zloop  ◄ If:                                                                                                                                                             
      Then:                                                                   
208  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:      rr gt qq                                                                                                                                                
       Then: goto donez                                                        
209  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:                                                                   
       Then: y=y+"1"                                                           
210  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:                                                                   
       Then: flelst(y)=nextdir()                                               
211  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
nextz  ◄ If:                                                                   
       Then:                                                                   
212  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:                                                                   
       Then: rr=rr+"1"                                                         
213  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:                                                                   
       Then: goto zloop                                                        
214  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
donez  ◄ If:                                                                   
       Then:                                                                   
215  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:                                                                   
       Then: aa=listbox(flelst,"1",y)                                          
216  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:                                                                   
       Then: qz=closedir()                                                     
217  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:                                                                   
       Then: end                                                               

Thank you
Christopher Sellitto
VP Computer Operations
Guaranteed Returns
100 Colin Drive
Holbrook, NY 11741
(631) 689-0191 x132
sellich at guaranteedreturns.com


More information about the Filepro-list mailing list