Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT copy application folder to disk C

QT copy application folder to disk C

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 608 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PanKamil897
    wrote on last edited by PanKamil897
    #1

    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");

    Please help

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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).

      (Z(:^

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved