I have two folder directory
directory1<-"C:/Folder1/"
directory2<-"C:/Folder2/"
Folder 1 contains file
"123456.pdf", "234567.pdf", "345678.pdf", "456789.pdf"
Folder 2 contains file
"123456_Jon.pdf","234567_Mike.pdf", "345678_Bill.pdf","456789_Ralph.pdf","Random_file.pdf"
If the pdf's in folder 1 and 2 share the first 6 numbers then i want to join them and create a new file in directory1
named
"123456_Join.pdf","234567_Join.pdf","345678_Join.pdf","456789_Join.pdf"