Copy files and folders from directory in QT pro fi

2019-08-16 06:47发布

问题:

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

标签: qt qt4 qmake