BEST ANSWER: wget -r ftp://user:pass@192.168.1.20/directory/*
OTHERWISE...
ftpls.sh
!/bin/sh
ftp -n 192.168.1.20 << EOT user username password dir $1 quit EOT
subdirs.sh
!/bin/sh
./ftpls.sh | grep ^d | awk '{print $9}'
this calls the above script to get the dir listing to stdout
then piped to grep to get directory lines
then piped to awk to only display the 9th column, dir names
for line in $( ./ftpls.sh $1 | grep ^d | awk '{print $9}') do ./ftpls.sh $1/$line | grep ^d | awk '{print $9}' done