Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. MDTM:Command not understood
QtWS25 Last Chance

MDTM:Command not understood

Scheduled Pinned Locked Moved General and Desktop
qnetworkaccessmftp
3 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rohith
    wrote on 30 Aug 2017, 06:10 last edited by Rohith
    #1

    Hi,

    I am trying to download file from our company's various FTP server's using QNetworkAccessManager by the help of signal

    downloadProgress(qint64,qint64)
    

    and all the server's contains authentication, So i have added signal

    authenticationRequired(QNetworkReply*,QAuthenticator*)
    

    to perfrom authentication and i also tried another method .

    downloadUrl.setUserName("username");
    downloadUrl.setPassword("password");
    manager.get(QNetworkRequest(downloadUrl));
    

    But i am facing the following errors for each of the server while trying to download from them

    Server - 1
    
    The Url is  QUrl( "ftp://(IP)/AA_v3.5.exe" )  
    The Url is  QUrl( "ftp://(IP)/AA_v3.5.exe" )  
    void Widget::onAuthenticationRequestSlot(QNetworkReply*, QAuthenticator*) 
    void Widget::onAuthenticationRequestSlot(QNetworkReply*, QAuthenticator*) 
    Reply Message "Error while downloading ftp://(IP)/AA_v3.5.exe: 'MDTM': command not understood." 
    File Downloading Failed--  QUrl( "ftp://(IP)/AA_v3.5.exe" )  -- "Error while downloading ftp://(IP)/AA_v3.5.exe: 'MDTM': command not understood." 
    
    Server-2
    The Url is  QUrl( "ftp://(IP)/21.05.2016.xls" )  
    The Url is  QUrl( "ftp://(IP)/21.05.2016.xls" )  
    void Widget::onAuthenticationRequestSlot(QNetworkReply*, QAuthenticator*) 
    void Widget::onAuthenticationRequestSlot(QNetworkReply*, QAuthenticator*) 
    The Total File Size is 0 
    The Size downloaded is 0 
    Reply Message "Error while downloading ftp://(IP)/21.05.2016.xls: /21.05.2016.xls: The system cannot find the file specified. " 
    File Downloading Failed--  QUrl( "ftp://(IP)/21.05.2016.xls" )  -- "Error while downloading ftp://(IP)/21.05.2016.xls: /21.05.2016.xls: The system cannot find the file specified.
    
    Server-3
    The Url is  QUrl( "ftp://(IP)/download/4096KB" )  
    The Url is  QUrl( "ftp://username:password@(IP)/download/4096KB" )  
    QNetworkAccessCache::removeEntry: trying to remove key 'ftp-connection:ftp://(IP)' that is not in cache
    The Total File Size is 0 
    The Size downloaded is 0 
    Reply Message "Logging in to (IP) failed: authentication required" 
    File Downloading Failed--  QUrl( "ftp://(IP)/download/4096KB" )  -- "Logging in to (IP) failed: authentication required" 
    
    

    But when i am trying with wget command i am able to download files successfully. Do i need to add anything more in order to avoid errors.

    Thanks in advance,
    Rohith.G

    J 1 Reply Last reply 30 Aug 2017, 06:50
    0
    • R Rohith
      30 Aug 2017, 06:10

      Hi,

      I am trying to download file from our company's various FTP server's using QNetworkAccessManager by the help of signal

      downloadProgress(qint64,qint64)
      

      and all the server's contains authentication, So i have added signal

      authenticationRequired(QNetworkReply*,QAuthenticator*)
      

      to perfrom authentication and i also tried another method .

      downloadUrl.setUserName("username");
      downloadUrl.setPassword("password");
      manager.get(QNetworkRequest(downloadUrl));
      

      But i am facing the following errors for each of the server while trying to download from them

      Server - 1
      
      The Url is  QUrl( "ftp://(IP)/AA_v3.5.exe" )  
      The Url is  QUrl( "ftp://(IP)/AA_v3.5.exe" )  
      void Widget::onAuthenticationRequestSlot(QNetworkReply*, QAuthenticator*) 
      void Widget::onAuthenticationRequestSlot(QNetworkReply*, QAuthenticator*) 
      Reply Message "Error while downloading ftp://(IP)/AA_v3.5.exe: 'MDTM': command not understood." 
      File Downloading Failed--  QUrl( "ftp://(IP)/AA_v3.5.exe" )  -- "Error while downloading ftp://(IP)/AA_v3.5.exe: 'MDTM': command not understood." 
      
      Server-2
      The Url is  QUrl( "ftp://(IP)/21.05.2016.xls" )  
      The Url is  QUrl( "ftp://(IP)/21.05.2016.xls" )  
      void Widget::onAuthenticationRequestSlot(QNetworkReply*, QAuthenticator*) 
      void Widget::onAuthenticationRequestSlot(QNetworkReply*, QAuthenticator*) 
      The Total File Size is 0 
      The Size downloaded is 0 
      Reply Message "Error while downloading ftp://(IP)/21.05.2016.xls: /21.05.2016.xls: The system cannot find the file specified. " 
      File Downloading Failed--  QUrl( "ftp://(IP)/21.05.2016.xls" )  -- "Error while downloading ftp://(IP)/21.05.2016.xls: /21.05.2016.xls: The system cannot find the file specified.
      
      Server-3
      The Url is  QUrl( "ftp://(IP)/download/4096KB" )  
      The Url is  QUrl( "ftp://username:password@(IP)/download/4096KB" )  
      QNetworkAccessCache::removeEntry: trying to remove key 'ftp-connection:ftp://(IP)' that is not in cache
      The Total File Size is 0 
      The Size downloaded is 0 
      Reply Message "Logging in to (IP) failed: authentication required" 
      File Downloading Failed--  QUrl( "ftp://(IP)/download/4096KB" )  -- "Logging in to (IP) failed: authentication required" 
      
      

      But when i am trying with wget command i am able to download files successfully. Do i need to add anything more in order to avoid errors.

      Thanks in advance,
      Rohith.G

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 30 Aug 2017, 06:50 last edited by
      #2

      @Rohith said in MDTM:Command not understood:

      ftp://115.111.229.10/21.05.2016.xls

      Does this URL work with wget?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rohith
        wrote on 30 Aug 2017, 08:30 last edited by Rohith
        #3

        @jsulm said in MDTM:Command not understood:

        ftp://115.111.229.10/21.05.2016.xls

        Thanks for replying, yes the url is working fine with wget

        wget ftp://username:password@(IP)/21.05.2016.xls

        1 Reply Last reply
        0

        1/3

        30 Aug 2017, 06:10

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved