curl-library
Another ftp delete question
Date: Thu, 19 May 2005 15:38:28 +0100
This may be very silly question but i am just trying to delete a file
from a server but the following code also doing a LIST on the server
as well the delete. Is there anyway to prevent the LIST?
So every time i do a delete i am getting some data back because of the LIST.
What i am trying to do in my main program just delete a file from the
server. I am not interested in the list of files on the server.
I can't really group the deletes together since the names of files are
told to my program by some other program. Also am not allowed to
buffer them up. I have to delete it the minute i am told the name.
Many thanks
int main(void)
{
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *m_curl = curl_easy_init();
struct curl_slist *list = NULL;
list = curl_slist_append(list, "DELE 66070376.xml");
curl_easy_setopt(m_curl, CURLOPT_URL, "ftp://test:test@localhost");
curl_easy_setopt(m_curl, CURLOPT_QUOTE, list);
curl_easy_perform(m_curl);
curl_slist_free_all(list);
curl_easy_cleanup(m_curl);
curl_global_cleanup();
return 0;
}
here is the server logs
(000040) 19/05/2005 15:14:51 - (not logged in) (172.16.13.171)>
Connected, sending welcome message...
(000040) 19/05/2005 15:14:51 - (not logged in) (172.16.13.171)>
220-FileZilla Server version 0.9.3 beta
(000040) 19/05/2005 15:14:51 - (not logged in) (172.16.13.171)>
220-written by Tim Kosse (Tim.Kosse_at_gmx.de)
(000040) 19/05/2005 15:14:51 - (not logged in) (172.16.13.171)> 220
Please visit http://sourceforge.net/projects/filezilla/
(000040) 19/05/2005 15:14:51 - (not logged in) (172.16.13.171)> USER test
(000040) 19/05/2005 15:14:51 - (not logged in) (172.16.13.171)> 331
Password required for test
(000040) 19/05/2005 15:14:51 - (not logged in) (172.16.13.171)> PASS ****
(000040) 19/05/2005 15:14:51 - test (172.16.13.171)> 230 Logged on
(000040) 19/05/2005 15:14:51 - test (172.16.13.171)> PWD
(000040) 19/05/2005 15:14:51 - test (172.16.13.171)> 257 "/" is
current directory.
(000040) 19/05/2005 15:14:51 - test (172.16.13.171)> DELE 66070376.xml
(000040) 19/05/2005 15:14:51 - test (172.16.13.171)> 250 File deleted
successfully
(000040) 19/05/2005 15:14:51 - test (172.16.13.171)> EPSV
(000040) 19/05/2005 15:14:51 - test (172.16.13.171)> 229 Entering
Extended Passive Mode (|||46094|)
(000040) 19/05/2005 15:14:51 - test (172.16.13.171)> TYPE A
(000040) 19/05/2005 15:14:51 - test (172.16.13.171)> 200 Type set to A
(000040) 19/05/2005 15:14:51 - test (172.16.13.171)> LIST
(000040) 19/05/2005 15:14:51 - test (172.16.13.171)> 150 Connection accepted
(000040) 19/05/2005 15:14:51 - test (172.16.13.171)> 226 Transfer OK
(000040) 19/05/2005 15:14:59 - test (172.16.13.171)> QUIT
(000040) 19/05/2005 15:14:59 - test (172.16.13.171)> 221 Goodbye
Received on 2005-05-19