Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if !file(filename-".ext") how to

Status
Not open for further replies.

agoodrich

MIS
Jul 13, 2004
37
US
If I open a dbf with a list of file names with out the extension how do I do this?

Do while NOT End of file
If the file+".ext" exist Then
do this code
Else
do this code
End do

Thanks.
 
Use Youfile.dbf
sele Yourfile
scan
cFile = rtrim(FieldName)+'.ext'
&& Fieldname is the name of the field in your dbf file that contains the data about the file name you are looking for.

if File(cFile)
do this code
else
do this code
endif
Endscan


Ali Koumaiha
Wireless Toyz
Farmington Hills, Michigan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top