Quote Originally Posted by fatima View Post
Hi,
Thanx for replying.

I am making an application that needs to create a folder on the remote computer using ftp.

[...]

Please tell me , what else I should do.
Hi,

As you probably know, the QFtp command functions like rename() and mkdir() do nothing by themselves but enqueue that command for asynch execution. So, the int returned by, for instance, wftp->mkdir("user007"); is not a sucess/failure code but the index of that operation in the queue.

As the first lines in your code show, somewhere else in your code you need to define two private slots:

Qt Code:
  1. void wftpCommandFinished(int iCommand, bool bError);
  2. void wftpDone(bool bError);
To copy to clipboard, switch view to plain text mode 

and connect them to QFtp signals:

Qt Code:
  1. connect(wftp, SIGNAL(commandFinished(int,bool)), this, SLOT(wftpCommandFinished(int,bool)));
  2. connect(wftp, SIGNAL(done(bool)), this, SLOT(wftpDone(bool)));
To copy to clipboard, switch view to plain text mode 

In the wftpCommandFinished() slot code, you may test for error and, if any, get the code and the description of the error with wftp->error() and wftp->errorString(). This may cast more light on the reason of the failure. Same for wftpDone.

Ciao,

Miwarre