I have 1200 .txt files with names like: 0001014473-10K-20221231_ Verisign_summary.txt
Each file has a unique company name. Above it is Verisign.
I have one single text file with 1200 company names in a list and each company name has a company symbol such as VRSN for Versign.
I want to rename the .txt files so that the symbol string is included or entirely replaces the long filename above.
So, ideally, the filename 0001014473-10K-20221231_ Verisign_summary.txt would become VRSN.txt
I expect this is a case of matching the company name in the filename to the company name in the list. But I don’t know how to code this.
Also, I would be able to create 1200 empty text files with the name format Versign.txt etc, and then replace the content with the long name file content. But again, how to do this?
Thanks in advance for any ideas.
I am new to the coding game so I am not sure where to start on this.