I’m trying to combine PDF’s in a specific order in a folder and there are 100’s of folders. In the folders, there’s 4 files that will always be named the same and there potentially could be more that are dynamic. Each Folder is named with the ‘Account Number’ and the pdf’s start with that ‘Account Number’.
Folder: 987612 (Acount Number)
987612.Salesforce.pdf
987612.Quotecheck.pdf
987612.Email.pdf
987612.Agreement.png.pdf
then any other pdf’s would be 987612.“File Name”.pdf
I need to combine these in this order: Email, Quotecheck, Salesforce, Agreement, * any other pdf’s in the folder.
I’m trying to use Join PDF files function as I don’t have access to document understanding in my license. Thanks for any help given.
Inside that use join pdf with {Path.Combine(currentfolder.FullName,currentfolder.Name+".quotecheck.pdf"), Path.Combine(currentfolder.FullName,currentfolder.Name+".salesforce.pdf"), Path.Combine(currentfolder.FullName,currentfolder.Name+".agreement.pdf")}.ToList.concat(Directory.GetFiles(currentfolder.FullName).Where(function(x) Not x.Contains("salesforce") and Not x.contains("quotecheck") and not x.contains("agreement"))).ToArray