How can I save a file to a dynamic folder?

I want to save a file, whose filename contains a specific definition, into a directory that follows a convention.

For example: A file starting with

2025_03_Filename.xlsx

should be stored in a SharePoint directory named

\2025\03_MAR

. This should apply to subsequent months as well.

Cheers

Robert