I'm going to be as thorough as possible.
I have a folder with a bunch of files, an example of how it looks:
RE-101-00001-EMB-LOD
RE-101-00001-EMB-LOL
RE-101-00002-EMB-LOL
RE-101-00002-EMB-LOD
RE-101-00003-EMB-LOD
RE-101-00003-EMB-LOL
What I'm looking for is a script that will move both the LOL & the LOD files for each pair that share the same 5 digit code (i.e. 00002) into a folder that is named the filename minus the "-LOL" portion.
So just to be clear The script should take both RE-101-00001-EMB-LOL.pdf & RE-101-00001-EMB-LOL.pdf and move them into a folder that will be created named RE-101-00001-EMB
Hope that makes sense. Any help would be appreciated. This task just got dropped on my lap at work and my beginner coding knowledge can't come up with a solution.