Hi Muhammad,
The reserved characters, "?" and "*", are also wildcards. Hence, you can type the File Open or Save as dialog boxes to list files in a folder via the common dialog. However, you can't save files with such reserved characters in the file name.
Please see:
Naming Files, Paths, and Namespaces - Win32 apps | Microsoft Learn:
https://learn.microsoft.com/en-us/windows/win32...
Excerpt:
*******
Do not use the following reserved names for the name of a file:
CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, COM¹, COM², COM³, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, LPT¹, LPT², and LPT³.
*******
and
*******
The following reserved characters:
< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
*******
Maybe you're not getting the "file name is not valid" message is because "?" and "*" are wildcards.
MS-DOS and Windows Wildcard Characters | Microsoft Learn: