That’s why Row_Inserting and/or Row_Updating server events are for. You may rename the file or even multiple files in those events to the ones that suits your needs.
This might help you: How to rename multiple files and displayed it vertically (v2022). It should work also for v2023.