I have a directory filled with thousands of files in the format LastnameFirstnameYYYYMMDD.pdf. The last and first name will always been in title case.
I'd like to extract the last name so I can move these files to a directory structure of {first letter of last name}/lastname/full filename. Example: DoeJohn20190327 would be moved to D/Doe/DoeJohn20190327