pipigril
asked on
File list
I have file names in TXT file (1 name = 1 line). Now I need to compare file list in TXT with files in C:\WINDOWS and write to Memo names of files, which are new or added.
Delphi 3
Step by step, please...
Delphi 3
Step by step, please...
or you could call command.com to pipe a dir c:\windows\*.* to a text file & load that, though the findFirst/findNext method would prob. be cleaner.
Gl
Mike
Gl
Mike
or you could use a TFileListBox compnent, point it at the appropriate
directory, and read a line of the file
and compare that to the lines in the component
directory, and read a line of the file
and compare that to the lines in the component
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
read the textfile in a tstringlist
read the filenames in a tstringlist (findfirst/findnext)
now go through the file-Tstringlist and lookup in the text-Tstringlist with the indexof-method
if the result < 0 then add the filename to your memo
meikl