Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QT copy application folder to disk C
PanKamil897 last edited by PanKamil897
Hello. How to copy my directory of my application with all dlls, and app.exe to for example c:/?
This not work: QFile::copy(QCoreApplication::applicationFilePath, "c:/test.exe");
QFile::copy() will copy a single file only. So you need to create a loop that will go through all the files and directories in your base path, and copy them one by one (while remembering to create the paths, too).
Also, please remember that c:/ drive is very special on Windows, so you can be stopped by the OS (unless you give your application administrative rights).