Writing to .txt file using Node-RED. Want to write to a new file name depending on timestamp, etc

Welcome to the Opto Forums Matt.

Yes, its a common request.
You can see some solutions here:

And here:

The moment node in conjunction with a RBE/Filter (Report by exception) node will probably do what you are looking for.
The RBE will only output once the date rolls over at midnight, till then, the data will go into the current file.