I would like to know how to determine whether string is valid file path.
The file path may or may not exist.
Have you tried regular expressions?
^([a-zA-Z]\:)(\\[^\\/:*?<>"|]*(?
should work