Listing items in listbox without certain extensions
Posted on 2004-10-19
I have a list of items in a listbox. I now want to list these same items in a second listbox but without files with extensions of ".gif" and ".jpg". I have tried the following code but it doesn't work. Why? I am using Delphi 6. Many thanks for your help.
i := 0;
if (ExtractFileExt(ListBox1.Items.Strings[i]) <> '.gif') or (ExtractFileExt(ListBox1.Items.Strings[i]) <> '.jpg) then
until i = ListBox1.Items.Count;