There is a bit much going on that seems incidental, so let me try to boil this down to the basics:
You have a list of text files. The goal is to construct a new file that contains a subset of the lines of these files (eliminating duplicates?).
I may not understand this correctly, but your current problem is to collate all the WindowType objects into a single object?
It sounds like you don’t have an enormous amount of data, so that fitting all filtered lines into memory would be an issue. It would then seem to be much faster to avoid writing all the intermediate results into a file (“FilteredFile”).
It sounds like you may want to replace the out = ... close(out) block by a function that just returns the filtered lines from one file as a Vector{String}. Then you could just loop over files, append the newly read lines to the list of lines from previous files, use unique to get rid of duplicates, and continue to the next file.
Perhaps I misunderstand, though…