How do I copy a file Or folder in the Program Files folder.
Experimented with:
system("xcopy pro_s\\pro C:\\Program Files /e /i /h");
But I did not succeed.
How do I copy a file Or folder in the Program Files folder.
Experimented with:
system("xcopy pro_s\\pro C:\\Program Files /e /i /h");
But I did not succeed.
試す
system("xcopy \"C:\\Program Files\\foldertocopy\" \"C:\\destination\" /e /i /h"); // Copy from
system("xcopy \"C:\\source\" \"C:\\Program Files\\foldertocopyinto\" /e /i /h"); // Copy to
後者には管理者権限が必要です。
「Program Files」にスペースがあり、問題が発生する可能性があります。二重引用符で囲む\"C:\\Program Files\"
か、"C:\\Progra~1"
C++ を使用している場合は、強力なブーストも使用できます。https: //stackoverflow.com/a/2536438またはhttps://stackoverflow.com/a/8594696を参照 するか、Windowsでは SHFileOperation APIを参照してください。