Greetings All!
I'm working on a crazy program and I've run into a problem. I'm using Hans Lunsing's PBLFN32 package and PowerBasic 3.5 for DOS. Whenever I bring the directory list into the array "DirList" I get some useless files that I don't need. I've extracted the code segment from the program and edited it for your perusal:
...as you can see, it has two entries of "." And ".." that I can easily parse out; but, is there any easy way to "touch" a file to see if it's accessible?
Also, on another note, is there a better way to create and fill the array than the one that I used? I use this method twice and the second time takes a bit longer as I'm inputting a large delimited file of variable records. I'll probably delve into some more questions as they crop up.
Don Ewald
mailto:[email protected][email protected]</A>
I'm working on a crazy program and I've run into a problem. I'm using Hans Lunsing's PBLFN32 package and PowerBasic 3.5 for DOS. Whenever I bring the directory list into the array "DirList" I get some useless files that I don't need. I've extracted the code segment from the program and edited it for your perusal:
Code:
$INCLUDE "lngfnam2.bi" $LINK "lngfnam2.pbu" 'Preinitialize data array File$ = LfnDirFirst$( "*.*", &h77 ) I& = 0 WHILE len( File$ ) > 0 I& = I& + 1 File$ = LfnDirNext$ WEND LI& = I& - 2 DIM DirList$( I& ) OPEN "dir.lst" for OUTPUT as #1 'Enter data into the array I& = 0 File$ = LfnDirFirst$( "*.*", &h77 ) WHILE len( File$ ) > 0 DirList$( I& ) = File$ PRINT #1, File$ File$ = LfnDirNext$ I& = I& + 1 WEND CLEAR CLOSE #1 END
Also, on another note, is there a better way to create and fill the array than the one that I used? I use this method twice and the second time takes a bit longer as I'm inputting a large delimited file of variable records. I'll probably delve into some more questions as they crop up.
Don Ewald
mailto:[email protected][email protected]</A>
Comment