I have a small sequential password file - actually two. When I do an update, I read in one and write to the other. Naturally I want to read the most current file. Using filedialog works, but it's easy to click on the wrong file, especially if the names are similar and the print is small.
I am now using this code:
typ$ = ".txt"
if fileDate$(".dat") > fileDate$(".txt") then typ$ = ".dat"
open "security"+typ$ for input as #secFile
files path$, "security"+typ$, info$()
dts$ = (info$(1,2)) 'date time stamp
jDay = date$(dts$)
fileDate$ = str$(jDay) + right$(dts$,2) + mid$(dts$,10,8)
'right$(dts$,2) is am or pm
'mid$(dts$,10,8) is hours, minutes, seconds