Hello everybody,
I have got stucked somewhere in my code.
I want to copy all the content from one directory to another, means copy data from source to destination.
I have written the below code, But its not working
And i dont know why
QScopedPointer<QProcess> my_process
(new QProcess());
source.
append(QDir::separator());
source.append("*");
destination.
append(QDir::separator());
qDebug() << "Source : " << source;
qDebug() << "Destination : " << destination;
arguments << "-rf"
<< source
<< destination;
my_process->start("cp", arguments);
qDebug() << "Copied : " << my_process->waitForFinished();
qDebug() << my_process->errorString();
QScopedPointer<QProcess> my_process(new QProcess());
QString source = parent_path;
source.append(QDir::separator());
source.append("*");
QString destination = map_path;
destination.append(QDir::separator());
qDebug() << "Source : " << source;
qDebug() << "Destination : " << destination;
QStringList arguments;
arguments << "-rf"
<< source
<< destination;
my_process->start("cp", arguments);
qDebug() << "Copied : " << my_process->waitForFinished();
qDebug() << my_process->errorString();
To copy to clipboard, switch view to plain text mode
Please tell me what is the problem in my code.,??????
Bookmarks