It sounds like you're looking for
the FileExists
function[
^]:
if sStudent = ''
then
begin
Application.MessageBox('No data has been inputed. Please Input a name to search', 'Error no information to search', 0);
end
else if Not FileExists('Students\' + sStudent + '.zip')
then
begin
Application.MessageBox('Student file not found.', 'Error file not found', 0);
end
else
begin
RDisp.Lines.LoadFromFile('Students\' + sStudent + '.zip');
end;
However, it's not clear whether
the LoadFromFile
method[
^] supports reading Zip files. I would expect it to only support text files.