Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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

share|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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .