I want to copy folder A and paste to desktop.
I am currently using C++ so preferably an OO interface if available.
On Windows (Win32), you could use SHFileOperation, eg:
SHFILEOPSTRUCT s = { 0 }; s.hwnd = m_hWnd; s.wFunc = FO_COPY; s.fFlags = FOF_SILENT; s.pTo = "C:\\target folder\0"; s.pFrom = "C:\\source folder\\*\0"; SHFileOperation(&s);