Hi,
I just want to copy directory recursively instead of files from server machine to host machine ,I am using Qftp protocol for that but i am only able to copy files individually which is not solving my purpose as there are lots of log file that i have to copy.
Here are the codes that i am using for copying files.
///************test ***
// QFileInfoList
QString fileName
= fileList
->currentItem
()->text
(0);
qDebug()<<"File name is :"<<fileName;
if (QFile::exists(fileName
)) { tr("There already exists a file called %1 in "
"the current directory.")
.arg(fileName));
return;
}
file = new QFile(fileName
);
tr("Unable to save the file %1: %2.")
.arg(fileName).arg(file->errorString()));
delete file;
return;
}
ftp->get(fileList->currentItem()->text(0), file);
///************test ***
// QFileInfoList
QString fileName = fileList->currentItem()->text(0);
qDebug()<<"File name is :"<<fileName;
if (QFile::exists(fileName)) {
QMessageBox::information(this, tr("FTP"),
tr("There already exists a file called %1 in "
"the current directory.")
.arg(fileName));
return;
}
file = new QFile(fileName);
if (!file->open(QIODevice::WriteOnly)) {
QMessageBox::information(this, tr("FTP"),
tr("Unable to save the file %1: %2.")
.arg(fileName).arg(file->errorString()));
delete file;
return;
}
ftp->get(fileList->currentItem()->text(0), file);
To copy to clipboard, switch view to plain text mode
please help as i am stuck .
Bookmarks