Download using curl

Can anyone tell me the command to download multiple files from a single webpage using curl.

I've tried curl -O http://www.domain.com/
but don't know what to append to the end for the following instances

1) all files of the same extension on a webpage
2) all files no matter the extension

i'm trying to grab mostly wmv and various video files but 20 of them at a time.

MacBook Pro 2.4 6 GB Ram, Mac OS X (10.5.8)

Posted on Jan 25, 2011 10:09 PM

Reply
3 replies

Jan 26, 2011 4:59 AM in response to Bdayz

Curl will need to know the complete url for each file it downloads. I'm pretty sure there is no wild card expansion on the server side. If there are links to these files on the website, you might consider using wget to download the entire site:
wget -rkpq -l4 -nH -np <URL> 2>/dev/null
Or to see the links on a page you can use lynx:
lynx -dump http://www.domain.com | awk '/http/{print $2}'

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Download using curl

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.