Your script is substantially correct if not for the character $
that you have to delete and for the file name that you have to repeat
for i in {1..16}; do
wget http://url/$i.jpg -O C:/Users/User/Desktop/Test/$i.jpg
done
Indeed the option -O
asks to write the filename and not the directory.
-O file
--output-document=file
The documents will not be written to the appropriate files, but all will be concatenated together and written to file.
Some words more
In your version $wget
is a variable never assigned and so empty.
The result of the command inside the cycle becomes, for example,
http://url/1.jpg -O C:/Users/User/Desktop/Test/
that is a file not present on your HDD.
To investigate errors of this kind you can add an echo
in the line and see the output generated by your cycle:
for i in {1..16}; do
echo $wget http://url/$i.jpg -O C:/Users/User/Desktop/Test/
done
it will reveal your problem/mistake.