I get the names of the files from a folder using the FindAllFiles function, display them in listbox1. It's easy.
I have a problem how to do that after clicking on a file name in LISTBOX, the PATH for this file will be displayed
GetDir(0, S);
ChDir(s + '\credo-data-export\detections');
jsonFiles := FindAllFiles('', '*.json', False);
try
listbox1.Items := jsonFiles;
finally
jsonFiles.Free;
end;
ChDir(s);