title: CURL command line tool - Delete File from FTP server
body: <p>I'm actually trying to use <code>CURL</code> to make some operations on a ftp server in C++ with Visual Studio. I've no trouble to do some uploads or downloads with commande line tools.</p>
  
  <p>But for deleting some file I have some errors.</p>
  
  <p>Here is the command I type:</p>
  
  <pre><code>curl -v -u username:pwd ftp://host/FileTodelete.xml -Q '-DELE FileTodelete.xml'
  </code></pre>
  
  <p>This is the answer:</p>
  
  <pre><code>* Adding handle: conn: 0x1ca5260
  * Adding handle: send: 0
  * Adding handle: recv: 0
  * Curl_addHandleToPipeline: length: 1
  * - Conn 0 (0x1ca5260) send_pipe: 1, recv_pipe: 0
  * About to connect() to host port 21 (
  *   Trying ......
  * Connected to host (...) po
  &lt; 220-FileZilla Server version 0.9.49 beta
  &lt; 220 Bienvenue sur le serveur FTP de HandTrainer
  &gt; USER username
  &lt; 331 Password required for username
  &gt; PASS pwd
  &lt; 230 Logged on
  &gt; PWD
  &lt; 257 "/" is current directory.
  * Entry path is '/'
  &gt; '-DELE
  * ftp_perform ends with SECONDARY: 0
  &lt; 500 Syntax error, command unrecognized.
  * QUOT command failed with 500
  * Closing connection 0
  curl: (21) QUOT command failed with 500
  * Rebuilt URL to: FileTodelete.xml'/
  * Adding handle: conn: 0x1ca5260
  * Adding handle: send: 0
  * Adding handle: recv: 0
  * Curl_addHandleToPipeline: length: 1
  * - Conn 1 (0x1ca5260) send_pipe: 1, recv_pipe: 0
  * Could not resolve host: FileTodelete.xml'
  * Closing connection 1
  curl: (6) Could not resolve host: FileTodelete.xml'
  </code></pre>
  
  <p>Moreover, the file is on the server so I don't understand.</p>