How to determine if a filename is valid?
Posted on 1997-09-02
Hi, how do I determine if a string entered by the user is a valid filename? Forget the extension part (.*), just the first part, because I'll set the extension myself. The user just has to give the first part.
Yes, this is for Win95. I use Delphi3. I know of one way already, but it relies on an error being generated, and I would prefer a neater (maybe safer?) way.
If the answer you give me does not require trapping an error, and is correct, I'll give you an A. If it does require error trapping, and it's correct, I'll give you a C. If it's wrong, well, it's wrong. :-)