Hi,
Does anyone see why I cannot open a list of text files for input. I keep getting an "Access denied" when trying to issue the FOPEN command.
Thanks
searchdir = alltr(thisform.txt_in.value) + "*.*"
gnumber = ADIR(gaMessages, searchdir) && Create array
for ncount = 1 to gnumber
fname = alltr(thisform.txt_in.value) + ;
alltr(gaMessages(ncount, 1))
IF FILE(fname) && Does file exist?
gnHandle = FOPEN(fname,0) && If so, open read-write
messagebox("ERROR = " + str(ferror()))
STORE FSEEK(gnHandle, 0, 2) TO gnEnd && Move pointer to EOF
if (gnEnd > 0)
gcString = FGETS(gnHandle, gnEnd) && Store contents
MessageBox(gc_String)
endif
=FCLOSE(gaMessages(ncount, 1))
ENDIF
endfor
Does anyone see why I cannot open a list of text files for input. I keep getting an "Access denied" when trying to issue the FOPEN command.
Thanks
searchdir = alltr(thisform.txt_in.value) + "*.*"
gnumber = ADIR(gaMessages, searchdir) && Create array
for ncount = 1 to gnumber
fname = alltr(thisform.txt_in.value) + ;
alltr(gaMessages(ncount, 1))
IF FILE(fname) && Does file exist?
gnHandle = FOPEN(fname,0) && If so, open read-write
messagebox("ERROR = " + str(ferror()))
STORE FSEEK(gnHandle, 0, 2) TO gnEnd && Move pointer to EOF
if (gnEnd > 0)
gcString = FGETS(gnHandle, gnEnd) && Store contents
MessageBox(gc_String)
endif
=FCLOSE(gaMessages(ncount, 1))
ENDIF
endfor