I’m trying to split an array of strings (based on pdffiles in a folder) for every 20 items.
So far I’ve made this
ArrString = directory.getfiles(“path”)
should I go for a for each activity combines with the index or is it possible to divide the array into 20 items each
Lets say there is 89 files in folder, I would like to get 5 strings commaseparated containing the paths of
20 files
20 files
20 files
20 files
9 files
lastly the 5 strings should be used to combine the 20 pdffiles into 1 pdf file.
You can handle this inside a for loop using a counter. Every time the counter reaches 20, reset it and store the string. Or you could use LINQ to do this.
Just to know, why are you doing this? Windows by default has a character limit of 255 - 260 in a file path. You can override it, but just wanted to point that out.