On Windows is there an interface for Copying Folders?

前端 未结 7 562
陌清茗
陌清茗 2021-01-18 06:41

I want to copy folder A and paste to desktop.

I am currently using C++ so preferably an OO interface if available.

相关标签:
7条回答
  • 2021-01-18 07:20

    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);
    
    0 讨论(0)
提交回复
热议问题