how to transfer files from raspberry pi to External USB Drive?
-
how to transfer files from raspberry pi to External USB Drive?
c++ code :- -
-
@SGaist
Hi,bool copyFiles() {
const QString srcPath = QFileDialog::getOpenFileName(this, "Source file", "",
"All files (.)");
if (srcPath.isNull()) return false; // QFileDialog dialogs return null if user canceledconst QString dstPath = QFileDialog::getSaveFileName(this, "Destination file", "",
"All files (.)"); // it asks the user for overwriting existing files
if (dstPath.isNull()) return false;if (QFile::exist(dstPath))
if (!QFile::remove(dstPath)) return false; // couldn't delete file
// probably write-protected or insufficient privilegesreturn QFile::copy(srcPath, dstPath);
}These codes work well. Thanks