0

I want to copy all the files and directory from source folder to some other directory

the code I tried is below mentioned

BINARY_PATH = $$PWD/../Bin/
RESOURCE_PATH = $$PWD/../resources/

QT += core
QT -= gui

CONFIG += c++11

TARGET = untitled
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

SOURCES += main.cpp

win32 {

QMAKE_POST_LINK +=$$quote(cmd /c xcopy /s /q /y /i $${RESOURCE_PATH} $${BINARY_PATH}$$escape_expand(\n\t))

}

RESOURCE_PATH contain 2 files and 1 folder

The above code is not copying any files or filders from source directory. I am trying on windows 7

Sijith
  • 3,740
  • 17
  • 61
  • 101
  • what does ``mesage($$quote(cmd /c xcopy /s /q /y /i $${RESOURCE_PATH} $${BINARY_PATH}$$escape_expand(\n\t)))`` display if you add it to the pro file? Might be a case of using ``$$absolute_path`` when generating the command. – zeFrenchy Aug 18 '17 at 09:03
  • 1
    Possible duplicate of [Xcopy in pro file to copy the directory and files inside the directory](https://stackoverflow.com/questions/45791553/xcopy-in-pro-file-to-copy-the-directory-and-files-inside-the-directory) – Farhad Aug 22 '17 at 08:04
  • Possible duplicate of [Qmake Command to copy directory and files](https://stackoverflow.com/questions/45755217/qmake-command-to-copy-directory-and-files) – Murphy Aug 28 '17 at 12:32

0 Answers0