curl-users
Using MGET to download files with the mask *.csv
Date: Mon, 01 Aug 2005 17:08:47 +0100
Hi,
Is it possible using '-X MGET ...' to download all files with a
particular mask ('*.csv' or just '*') from a remote FTP folder.
I tried the following code...
curl -O -X MGET [address]:21/www/catalog/orders/*
ftp://[username]:[password]@[address]:21
but this doesnt work. :o(
The error response I get is...
curl: (23) Failed writing body
curl: (28) Resolving host timed out: [address]
yet if I do...
curl -o output.tmp -X MGET [address]:21/www/catalog/orders/*
ftp://[username]:[password]@[address]:21
it 'appears' to be working and downloading the files with the output
going to output.tmp but the resulting file is as follows...
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 16:40. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 15 minutes of inactivity.
530 You aren't logged in
500 ?
500 ?
500 ?
500 ?
421 Timeout - try typing a little faster next time
I know that the command...
curl -O
ftp://[username]:[password]@[address]:21/www/catalog/orders/WSOR[00000-99999].csv
work but takes forever (hours) as it tries every possible combination
rather than just getting the files that exist.
What am I doing wrong or is what I want to do not possible?
Thanks in advance...
Dave
Received on 2005-08-01