BUG: Using Wildcard Extension with SHFileOperationLast reviewed: March 20, 1998Article ID: Q182820 |
The information in this article applies to:
SYMPTOMSWhen you use the "*" wildcard for the extension in the target file name (pTo member of the SHFILEOPSTRUCT) in SHFileOperaiton, a message box with the following text appears:
The source and destination filenames are the same.In addition, no files are moved or copied. This bug is only present when you have Internet Explorer 4.0 or 4.01 with the desktop update installed.
RESOLUTIONThe only way to workaround this bug is to build the source and target file name lists without using wildcards.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Sample CodeThe following code exposes this bug:
SHFILEOPSTRUCT sfo; char szSource[MAX_PATH]; char szDest[MAX_PATH]; lstrcpy(szSource,"c:\\test\\file.*"); lstrcpy(szDest,"c:\\newfile.*"); szSource[lstrlen(szSource)+1] = 0; szDest[lstrlen(szDest)+1] = 0; sfo.hwnd = NULL; sfo.wFunc = FO_COPY; sfo.pFrom = (LPCSTR)szSource; sfo.pTo = (LPCSTR)szDest; sfo.fFlags = FOF_NOCONFIRMATION | FOF_SIMPLEPROGRESS | FOF_NOCONFIRMMKDIR | FOF_MULTIDESTFILES; sfo.hNameMappings = 0; sfo.lpszProgressTitle = "test"; int res = SHFileOperation(&sfo); Keywords : KBShell kbcode Version : WINDOWS:4.0,4.01;WINNT:4.0;WIN95; Platform : Win95 WINDOWS winnt Issue type : kbbug Solution Type : kbpending |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |