Probably a more elegant solution exists but the following works: tval := 0; while tval < memo1.lines.Count do begin with memo1.Lines do begin if (directoryexists(strings[tval])) then //its DEFINITELY a directory if not dirhasfile(strings[tval]) then begin delete(tval); dec(tval); end else strings[tval] := IncludeTrailingBackSlash(strings[tval]) + '*.*'; inc(tval); end; end;
--------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/