I have a program that attempts to save a file in a predetermined directory if it exists, otherwise the user is prompted where to save the file to.

The file is of a very specific naimg convention of #####XX###X.txt where #=number and X=letter.

There is also a corresponding directory located at "/someDir/anotherDir/aThirdDir/#####XX###X/manySubDirs". The #s and Xs in the filename are the same as in the directory so they match 100%.

Now sometimes the directory may be listed as aThirdDir/#####XX###X_XXX where the creator of the directory puts their initials at the end of the directory listing. I am trying to save the file in "/someDir/anotherDir/aThirdDir/#####XX###X_XXX/oneSubDir/". So I get the environment variable that holds "/someDir/anotherDir/aThirdDir/" and then append the #####XX###X to this directory listing. What I want to do then is append a "*" after the common name so if the _XXX part is there it will know to include this in the directory string. You can "cd" in this manner in a unix terminal window but it appears when I attempt to use the

Qt Code:
  1. QDir::isAbsolutePath( QString( "/someDir/anotherDir/aThirdDir/#####XX###X*/oneSubDir" ) );
To copy to clipboard, switch view to plain text mode 

It says the directory doesn't exist. Is there a way to get the QDir to know the * means a wildcard character and not the actual * character? Sorry for the long-winded explanation, but I thought a background on my problem could help find a solution. Thanks!