How do I download folders through FTP in Terminal?

Solution 1:

mget is the closest you can get with the included FTP binary. You have to mkdir and cd/lcd and then get all the files than match a pattern like *

The prompt toggle may come in handy.

FTP works within a directory, not on directories as containers of files. If you absolutely had to get the job done and ftp was the only tool you could use - you could cobble together an expect script to drive ftp for you.

Thankfully there are alternatives like scp|rsync|wget to get whole directories worth of files.

Solution 2:

Another way is to use curl

curl ftp://ftp.com/mp3/* --user login:password -o /myfolder/*

I think this is working, or file by file

curl ftp://ftp.com/mp3/mymusic.zip --user login:password -o mymusic.zip

I hope this helped.