0

I want to merge all files that contains the user identification in fileName.

To do that I use LINQ and finaly merge:

ID = 24 fileQuery return 4 files!

IEnumerable<FileInfo> fileQuery = from _file in fileList where _file.Extension == ".pdf" && _file.Name.Contains(ID + "-") && _file.Name != newFileName orderby _file.Name select _file;

using (Merger _merger = new(Path.Combine(Path.Combine(path, Tabela), newFileName)))
                                    {
                                        foreach (FileInfo fi in fileQuery)
                                        {
                                            _merger.Join(fi.FullName);
                                        }
                                        
                                        _merger.Save(Path.Combine(Path.Combine(path, Tabela), filename));
                                    }

But ONLY MERGE 2 FILES

  • 1
    Prolly you didn't pay ... And many 3rd party libraries are limited when are in trial ... in other case contact with customer serivces as this library is not open source – Selvin Mar 30 '23 at 12:11

0 Answers0