Results 1 to 3 of 3

Thread: Copy folder recursively from Remote Server to Host machine using Qftp protocol

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2016
    Posts
    3
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Copy folder recursively from Remote Server to Host machine using Qftp protocol

    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.

    Qt Code:
    1. ///************test ***
    2. // QFileInfoList
    3.  
    4. QString fileName = fileList->currentItem()->text(0);
    5.  
    6. qDebug()<<"File name is :"<<fileName;
    7.  
    8. if (QFile::exists(fileName)) {
    9. QMessageBox::information(this, tr("FTP"),
    10. tr("There already exists a file called %1 in "
    11. "the current directory.")
    12. .arg(fileName));
    13. return;
    14. }
    15.  
    16. file = new QFile(fileName);
    17. if (!file->open(QIODevice::WriteOnly)) {
    18. QMessageBox::information(this, tr("FTP"),
    19. tr("Unable to save the file %1: %2.")
    20. .arg(fileName).arg(file->errorString()));
    21. delete file;
    22. return;
    23. }
    24.  
    25. ftp->get(fileList->currentItem()->text(0), file);
    To copy to clipboard, switch view to plain text mode 

    please help as i am stuck .
    Last edited by anda_skoa; 19th September 2016 at 08:31. Reason: missing [code] tags

Similar Threads

  1. Remote host closed error
    By xeyos in forum Qt Programming
    Replies: 1
    Last Post: 19th August 2014, 07:16
  2. Qt application for remote Debugging on host pc for Beagleboard-xM
    By nilking in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 22nd September 2013, 13:06
  3. QSettings : rename/copy a group recursively
    By Kouillo in forum Qt Programming
    Replies: 1
    Last Post: 27th November 2012, 21:51
  4. QFtp: downloading a whole folder from a remote server.
    By balazsbela in forum Qt Programming
    Replies: 5
    Last Post: 5th August 2007, 09:34
  5. How to determine ip address of remote host?
    By nopalot in forum Qt Programming
    Replies: 1
    Last Post: 30th April 2006, 21:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.