wget -O for non-existing save path?
To download a file with wget, into a new directory, use --directory-prefix
without -O
:
wget --directory-prefix=/new/directory/ http://www.example.com/old_image.jpg
Using -O new_file
in conjunction with --directory-prefix
, will not create the new directory structure, and will save the new file in the current directory. It may even fail with "No such file or directory" error, if you specify -O /new/directory/new_file