I have 8,000 files and I want to merge the files that have the same prefix name in the filename. i.e.
122TX4939.pdf
122TX4939 Support.pdf
122TX4939 Additional.pdf
333RS111.pdf
333RS111 Support.pdf
555DA77.pdf
Results:
The first 3 would get merged into 1 file:
122TX4939.pdf
122TX4939 Support.pdf
122TX4939 Additional.pdf
The next 2 would get merged into 1 file:
333RS111.pdf
333RS111 Support.pdf
The last file would get copied or merged byitself
555DA77.pdf
and they would be in a destination folder other than the folder with the 8,000 pdf files.
How can i do this in a script?