Best way to delete all files with a prefix?
So when I start my program I need to delete any Files it may have created last run. There will always be one called output.txt so I just use:
There can also be any number of files that will Start with the word phase and then be followed by their phase number and individual ID numbers with the extention .txt.
What is the best way to delete all files with the folder that begin with the prefix "phase"?
I was going to just search for phase files squentialy since they are increasingly numbered and delete them untill I can not find anymore but there must be a better way.
Thank you for any help.