I'm trying to copy a file from one location to another using SHFileOperation:
SHFILEOPSTRUCT fileop;
fileop.hwnd = 0;
fileop.wFunc = FO_COPY;
fileop.pFrom = L"C:\\SomeDirectory\\SomeName.jpg\0";
fileop.pTo = L"C:\\SomeOtherDirectory\\SomeName.jpg\0";
fileop.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT;
fileop.fAnyOperationsAborted = FALSE;
fileop.hNameMappings = 0;
fileop.lpszProgressTitle = 0;
SHFileOperation(&fileop);
The problem is that instead of getting a copy of SomeName.jpg in SomeOtherDirectory an empty directory with name SomeOtherDirectory\SomeName.jpg is created, any clues?