How to split one text file into multiple text files according to text content?

Hi.

How to edit the add another folder with another date within the same month?
Like below:
image
Because when i run the script-Sample20221117-4v5.zip, there is error message.