Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Merging folders QDir



  • Hi, i've got a need in merging two folders, means moving+replacing all the contents of one folder into the target folder, same as windows does it.
    is there a way to accomplish this with QDir? QDir::rename() as described, won't work if the "new dir name" already exists. any other function?

    thanks!


  • Lifetime Qt Champion

    Hi,

    You can list the content of the folder you want to move and rename each element to the folder to merge in.


Log in to reply