MacOS – Downloading All MP3 Files from a Web Site Using Terminal

macosmp3terminal

I am wondering if there is any software available in OS X that can download all mp3s or specific type of file from a URL. For e.g. I have a url http://www.parweztv.com/Khan%20Adeeb/SURA-04/ and I want to grab all mp3 from this url instead of right clicking one by one and saving it.

Also wondering, if that can be done using wget or some terminal command in OS X?

Best Answer

You can use wget like this:

wget -r -nd -A.mp3 http://www.parweztv.com/Khan%20Adeeb/SURA-04/

-r to recursively download all files below the level of the URL specified

-nd to not create a hierarchy of directories in your download location (not necessary)

-A to specify the files you want to download (all files ending in .mp3 in your case)

You can obtain wget for OSX via homebrew or macports.