Originally posted by Mike Burgett:
Kurt,
This is what I use to determine if a file exist:
FILE$ = "F:\public\FileName.Dat" 'Path and File name here
x$ = DIR$(file$) 'Look for File
IF x$ = RIGHT$(file$,12) THEN 'Check just the name for match
Indicator = 1 'True
ELSE
Indicator = 0 'False
END IF
Hope this helps.
Kurt,
This is what I use to determine if a file exist:
FILE$ = "F:\public\FileName.Dat" 'Path and File name here
x$ = DIR$(file$) 'Look for File
IF x$ = RIGHT$(file$,12) THEN 'Check just the name for match
Indicator = 1 'True
ELSE
Indicator = 0 'False
END IF
Hope this helps.
It's much safer to check for failure and compare the result of DIR$ with an empty string...
Also keep in mind when you use DIR$ that it overwrites your previous DTA information, so
you cannot use it inside another DIR$ loop. The PB example saves and restores this DTA...
------------------
Sebastian Groeneveld
mailto:[email protected][email protected]</A>
Comment