Thanks, but I don't think it's worth continuing. I'm a beginner, but I don't do the stupid thing of writing two "finfirst" instructions one after the other without closing them first, as someone noted above. In my example, there are two "finfirsts" but there is a comment after them
findfirst('*.adi',FileAttrs,sr); {when the files are in the same folder as the application and they open correctly}
findfirst('FOLDER\*.txt',FileAttrs,sr); {when the files are in a folder subordinate to the one with the application and the reset function deletes them}
which should show that I use only one of them, I block the other one with //. When reading from the folder with the application it works fine, when reading from another folder, after the "Reset" function, the files disappear.
I will not provide the source of the application. But, in the meantime, I solved the problem by doing other maneuvers, at my level of skill. But it is clear to me that the "Reset" function deletes files when they are taken from another folder, it is the only difference between the two execution modes and that is the problem. If this is difficult to understand, I cannot show more.
Closed topic.
Oproescu