GetValidFileName function – removes or replaces illegal characters from a file name
The GetValidFileName function will examine a value for characters which are illegal in a file name, and either remove those illegal characters, or replace them with a string supplied to the function.