Hi Community ,
i am trying to segregate a list of file names based on the file substring. I have a reference type array and a list of filenames , i need to create a new array of just the file names of the type.
Input :
Array 1: Filenames list
filelist { C:\Test\Type1-20220410.pdf,
C:\Test\Type2-20220411.pdf,
C:\Test\Type3-20220412.pdf,
C:\Test\Type1-20220413.pdf,
C:\Test\Type2-20220414.pdf,
C:\Test\Type1-20220415.pdf,
C:\Test\Type2-20220416.pdf,
C:\Test\Type1-20220417.pdf,
C:\Test\Type1-20220418.pdf}
Array 2 : Reference List
ref{type1,type2}
Expected output :
Array 1:
Type1list{C:\Test\Type1-20220410.pdf,
C:\Test\Type1-20220413.pdf,
C:\Test\Type1-20220415.pdf,
C:\Test\Type1-20220417.pdf,
C:\Test\Type1-20220418.pdf}
Array 2
Type2list{C:\Test\Type2-20220411.pdf,
C:\Test\Type2-20220414.pdf,
C:\Test\Type2-20220416.pdf}
I want to dynamically create these arrays based on the reference list , if later type3 is added to the list . the code should be able to dynamically create 3 array lists .
Any help would be much appreciated , Thank you.