I have some problem configuring wget right for my needs, i have a file, named images.txt, containing a list of urls to required images, the command for wget is simple: wget -i images.txt however wget doesn't keep the original filenames, that are in the url, the filenames are very specific, for example all of the urls are look like this: http://somesite.com/someimage.jpg/123/456/789/, after downloading it converts a file to index.html, index2.html and so on. How do i configure it to save files as it is in the url: "someimage.jpg/123/456/789/" ?

Any help would be very helpful.

link|improve this question
feedback

1 Answer

Have a look at the -x option, that'll create a directory structure, not sure if it'll save the filenames correctly but the doco suggests so.

http://linux.die.net/man/1/wget

link|improve this answer
Chris, thanks for an answer, but i can access these files only from the urls directly, the folder itself is not accessible. – Mike Dec 28 '11 at 14:24
Perhaps I should've clarified that it creates a matching local directory structure (those forward-slashes are treated by wget as directories). If you want a file literally called "someimage.jpg/123/456/789/", you won't be able to do that, because wget considers 123, 456 and 789 to be directory names. – Chris Adams Dec 28 '11 at 14:34
OH, i see now, i think i have to to make some research on how to rename those output index1.html, index2.html, etc. files to what i have in the list, that would be the only decision in my case. – Mike Dec 28 '11 at 14:40
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.