Wget: download files to specific directory

use -P option.

wget -P /home/user/directory_you_want http:url_you_are_downloading_from

See more at : Stackoverflow page


The -P option downloaded all the files to the specific directory however it created 2 new directories inside the target directory.

So the files went into /home/user/xml/192.168.1.1/public_html/

So I tried it with the -P option and the -nd option and it worked the way I needed it to.

The final code looks like this

wget -m -nd --user=user --password=password -r -l1 --no-parent -A.rss ftp://localhost/public_html/ -P /home/user/Desktop/xml/