You forgot to escape the backslash before SaveDb. This results probably in an invalid copy command, and thats why the process doesn't start.
Also, a %2 seems to be missing in the copy command string to take the second argument of QString::arg.
Did you consider using QFile::copy instead of starting a process:
QFile f
(QString("%1/Db/TSF_CARNET_REVEILS.FDB").
arg(qApp
->applicationDirPath
()));
if (!f.exists())
{
QMessageBox::critical(this, AppName,
"Fichier de base de données introuvable.");
return;
}
f.
copy(QString("%1/Db/SaveDb/%2").
arg(qApp
->applicationDirPath
(),
QDate::currentDate().
toString("dd_MM_yyyy")));
QFile f(QString("%1/Db/TSF_CARNET_REVEILS.FDB").arg(qApp->applicationDirPath()));
if (!f.exists())
{
QMessageBox::critical(this, AppName, "Fichier de base de données introuvable.");
return;
}
f.copy(QString("%1/Db/SaveDb/%2").arg(qApp->applicationDirPath(), QDate::currentDate().toString("dd_MM_yyyy")));
To copy to clipboard, switch view to plain text mode
Bookmarks