So , i need to check if a string has a dot, if not, the user needs to input until a string with a dot is provided.
something like this, the user needs to provide something like exmaple.txt, or .dat
Enter Input File Name: example
Error, invalid file name.
FYI the major operating systems all allow files without a dot. Most of the text files I use even on windows are extensionless.
if you are going to do a large # of checks, like every file on your disk, find may be slightly slower than a dumb loop as it does more work than is needed. You won't notice this until the number of names you test becomes extremely large.