Where on my computer did Wget download this image?

7

2

I am using Windows XP. I just downloaded wget and put it into my C:\Windows folder.

I then ran this command line (trying to download an image from a website):

wget -r -A ".jpg,.gif,.png" http://somesite'sURL/lang2.JPG

A black DOS-like window appeared for a few seconds showing me that some kind of process was taking place. I assume it was the process of downloading. I could see the growing percentage numbers shown. Once it reached 100%, the black window vanished and now I can't find where the downloaded image is. I looked all over the C:\Windows folder, but I didn't find lang2.JPG. Where is it supposed to be?


I have discovered that a folder is created, and the file is being downloaded, but then it is removed "since it should be rejected". Why it should be rejected I don't know. Do you think there is a way of "catching" it on my computer before it is rejected? And why is it still being downloaded first if it's to be rejected?

Here's the command window contents:

C:\Documents and Settings\Administrator> wget -r -A".jpg,.gif,.png" http://sitename.URL
--2009-12-01 22:33:18-- http://sitename.URL 
Resolving sitename.URL…xx.xx.xx.xx 
Connecting to sitename.URL¦xx.xx.xx.xx¦ :80…
connected. HTTP request sent, awaiting response… 403 Forbidden
--2009-12-01 22:33:22 ERROR 403: Forbidden.  

C:\Documents and Settings\Administrator> wget -r -A ".jpg,.gif,.png" http://sitename.URL/lang2.JPG
--2009-12-01 22:35:51--  http://<the site’s name>/lang2.JPG 
Resolving sitename.URL…xx.xx.xx.xx
Connecting to sitename.URL¦xx.xx.xx.xx¦ :80… connected. 
HTTP request sent, awaiting response… 200 OK 
Length: 39249 <38K> [image/jpeg] 
Saving to: ‘sitename.URL/lang2.JPG’  

100%[======================================>] 39,249      6.36 KB/sec      in 6.0 s

2009-12-01 22:35:58 <6.36 KB/s> - ‘sitename.URL’ saved [39249/39249]

Removing sitename.URL/lang2.JPG since it should be rejected.

FINISHED --2009-12-01 22:35:58—
Downloaded: 1 files, 38K in 6.0s <6.36 KB/s> 
C:\Documents and Settings\Administrator>

brilliant

Posted 2009-12-01T09:22:38.797

Reputation: 485

Answers

9

It sounds like you entered the wget command directly into the Start->Run dialog. If that's the case, you want to do this to move it to your Desktop:

  1. Start->Run, enter cmd, press ENTER.

  2. Check that the file is there: dir lang2.JPG (should output the file details). If you don't see the file listed, run dir to get a full listing of the directory in case you've misspelled it (or wget didn't name it what you expected).

  3. Move it into the Desktop: move lang2.JPG Desktop

This all assumes that the wget command that you ran executed in the same directory that the command window opens in. Step 2 should prove that one way or the other.

If you don't see the file listed in Step 2, you'll need to resort to using Windows Search, or redownload it (open a command window first this time!).

quack quixote

Posted 2009-12-01T09:22:38.797

Reputation: 37 382

@ ~quack: (1) Thank you for your answer. I am sorry that I couldn’t answer right away. Here I have discovered something, which may be better clarifying my situation. When I run either of these two lines : wget -r -A ".jpg,.gif,.png" http://<the site’s name> wget -r -A ".jpg,.gif,.png" http://<the site’s name>/ nothing really happens. But when I run this one: wget -r -A ".jpg,.gif,.png" http://<the site’s name>/lang2.JPG I discovered that my computer then creates a folder in C:\Documents and Settings\Administrator , and the name of that folder is exactly what I have there in the line instead – brilliant – 2009-12-01T15:43:43.210

(2) of <the site’s name>. (So the folder’s full path looks this way: C:\Documents and Settings\Administrator<the site’s name> ). But the problem is when I open that folder, there is nothing in it! When I discovered it I decided to run that third line again while keeping this folder open. And here is what was going on: The black DOS-like window popped up as usual informing me of the fact that HTTP request was sent and it was waiting for response. Some moments later I could see a line informing me of how big the file’s length was and of its extension (.jpg). – brilliant – 2009-12-01T15:45:28.793

(3) Right than another line appeared saying where exactly the file was being saved to (“saving to ‘<the site’s name>/lang2.JPG’). Simultaneously the progress bar showed up indicating the percentage of how much of the file was already downloaded. All this time I could see an icon of that my .jpg file, which was being downloaded. However, when the progress bar reached 100% and the DOS-like window closed that icon disappeared!!! So, eventually, all I got was just an empty folder, without any files. I’ve repeated it several times, the result is still the same. – brilliant – 2009-12-01T15:46:28.480

(4) So, now I will respond to your answer step by step: “It sounds like you entered the wget command directly into the Start->Run dialog” -Yes, that’s what I’ve been doing all along. Have I been wrong in doing that? In fact, I am not aware of any other way of running those command lines. “Start->Run, enter cmd, press ENTER.”

  • I did. What I saw there was this:

C:\Documents and Settings\Administrator>_ Well, I think what I described above has already answered the question of where the file is being saved to. What is really strange to me now is why it’s disappearing – brilliant – 2009-12-01T15:48:04.950

(5) right after having been downloaded.
“you'll need to resort to using Windows Search”

  • I did. It simply tells me that that the search hasn’t found such file.

“open a command window first this time!”

  • What’s the difference between the “Start->Run dialog window” and the “command window”?... Aaaaah! I think I understand now! That DOS-like window in fact IS the command window, right? So, I just tried to type those lines (the first and the third one) right into the command window instead of the “Start->Run dialogue” (it’s so strange – I can only type there and
  • < – brilliant – 2009-12-01T15:49:13.560

(6) cannot use Copy and Paste features!) So here is what I have in that window now, after having tried both lines. I think it will explain a lot:

C:\Documents and Settings\Administrator> wget -r -A ".jpg,.gif,.png" http://<the site’s name> --2009-12-01 22:33:18-- http://<the site’s name> Resolving <the site’s name>…<IP address> Connecting to <the site’s name>¦<IP address>¦ :80… connected. HTTP request sent, awaiting response… 403 Forbidden --2009-12-01 22:33:22 ERROR 403: Forbidden. – brilliant – 2009-12-01T15:50:19.750

(7) C:\Documents and Settings\Administrator> wget -r -A ".jpg,.gif,.png" http://<the site’s name>/lang2.JPG --2009-12-01 22:35:51-- http://<the site’s name>/lang2.JPG Resolving <the site’s name>…<IP address> Connecting to <the site’s name>¦<IP address>¦ :80… connected. HTTP request sent, awaiting response… 200 OK Length: 39249 <38K> [image/jpeg] Saving to: ‘<the site’s name>/lang2.JPG’

100%[======================================>] 39,249 6.36 KB/sec in 6.0 s – brilliant – 2009-12-01T15:51:16.503

(8) 2009-12-01 22:35:58 <6.36 KB/s> - ‘<the site’s name>’ saved [39249/39249]

Removing <the site’s name>/lang2.JPG since it should be rejected.

FINISHED --2009-12-01 22:35:58— Downloaded: 1 files, 38K in 6.0s <6.36 KB/s> C:\Documents and Settings\Administrator>_ – brilliant – 2009-12-01T15:52:00.607

(9) What on earth does it mean “removing… it should be rejected”? Is there any way to prevent it from removing? And, if it’s to be rejected, why than still download it first anyway? I am sorry for a big answer. I think I need to place these contents of the command window into the main field of my question, so that it is more readable. – brilliant – 2009-12-01T15:56:06.323

I think that wget is "removing.. should be rejected" the file because you requested a jpg file (in the arguments to -A) but the filename is JPG. wget is a Unix tool and probably considers those different. If you're just getting one file, you don't need the -A, so don't use it. – quack quixote – 2009-12-01T22:27:59.230

(1) Thank you!!! I tried this line: wget –r http://<the site’s name>/ lang2.JPG It worked this time!!! It did create the folder, downloaded the picture into it, and the picture DID NOT disappear! However, when I tried this one: wget –r http://<the site’s name> it didn’t do anything. I only got these lines in the command window: HTTP request sent, awaiting response… 403 Forbidden 2009-12-02 09:54:33 ERROR 403: Forbidden Why is it so that when I download a particular picture – brilliant – 2009-12-02T02:32:59.753

(2) from this site, it is not forbidden, but when I want to download all the files automatically, it is forbidden? I think this thread is already becoming too big, and it’s probably hard to read, so I will ask this as a new question. Te title of the question will go like this: “Why does wget download specific files, but can't download them all at once?” – brilliant – 2009-12-02T02:34:12.700

403 Forbidden is a response from the server saying "you aren't allowed to access this URL". maybe the site's misconfigured, or maybe there's no "index.html" file (and the site is disallowing an index view of the server's document root). i can't tell you without examining the site. – quack quixote – 2009-12-02T11:50:17.940

17

I have discovered if you leave the wget installation in its default location it does save the file in:

C:\Users\<current user>\AppData\Local\VirtualStore\Program Files (x86)\GnuWin32\bin

However when I copied the entire bin folder, including .dll files, onto my desktop and then retried downloading a file from within that folder via command prompt it worked correctly and put the file within the wget folder on my desktop.

Why it works differently depending on location when it's run I do not know but it's a solution to at least put files initially somewhere more accessible.

Kilroy0097

Posted 2009-12-01T09:22:38.797

Reputation: 171

1

For the record: My wget version (1.11.4 from http://gnuwin32.sourceforge.net/packages/wget.htm ) saved the files to %LOCALAPPDATA%\VirtualStore<wget_dir> ; so if wget is in c:\test\ the downloads are found at %LOCALAPPDATA%\VirtualStore\test

– Oliver Zendel – 2014-11-03T16:23:36.767

3

The reason it's different depending on location is you don't have permissions to write to one of the locations without elevating. See http://superuser.com/a/384116/117590 http://windowsteamblog.com/windows/b/developers/archive/2009/08/04/user-account-control-data-redirection.aspx http://www.windowsecurity.com/articles/Protecting-System-Files-UAC-Virtualization-Part1.html

– Bob – 2012-07-04T04:59:35.640

3

I have opened a command line and tried

wget http://google.com/ -o log.txt

My installation path of wget is

C:\Program Files (x86)\GnuWin32\bin

Both the log file and the index.html from the site were saved to path

%USERPROFILE%\AppData\Local\VirtualStore\Program Files (x86)\GnuWin32\bin

Why is this so?

I suspect that Windows is creating some sort of a virtual environment for running wget or just does not allow saving files into Program Files folder without admin permission and this leads to saving downloaded files into such deep location.

Michal

Posted 2009-12-01T09:22:38.797

Reputation: 31

This is what I experienced as well. Very strange. – Ardee Aram – 2012-06-14T15:07:30.963

3

I had a similar problem after downloading and using wget for windows 7. The problem was that I did not open a command window with administrative priviliges. Start->Run->cmd does not open a command window with administrative privileges. Wget was not in my PATH yet, so I ran it directly from the "Program Files (x86)" folder. There my command window could not create a directory to store everything in. Running a command window with administrative privileges (run as adminitrator) resolved the problem.

Kai

Posted 2009-12-01T09:22:38.797

Reputation: 31

2

It should download to the current "working" folder.

Windows is set as a path, so no matter where you are on your system, it should be accessible.

I would guess that the image will be in the root of your user profile -

On XP c:\Documents and Settings\username or click Start > Run then type %userprofile%

If this doesn't work, simply go to Start > Run and type "Cmd" as that should launch in whatever your home directory is, and you should find the file there.

William Hilsum

Posted 2009-12-01T09:22:38.797

Reputation: 111 572

2

The file should be saved into the directory from where you run the command.

For example, if you opened up a new command prompt it would usually start at:

c:\Documents and Settings\MY_USERNAME\

So if you ran the command there, thats where your file should be.

If you moved to a different directory, such as C:\WINDOWS then run the command, then the file would be stored there

Hope this helps

user155695

Posted 2009-12-01T09:22:38.797

Reputation: 2 819

Yes, that help. I just discovered that the folder is created and the file is downloaded, but later it gets removed. If you have time and desire to know the details and can comment on that, please refer to the details I added above. – brilliant – 2009-12-01T16:10:04.220

1

When using wget on windows, you first need to open a command prompt so that it will stay open, by doing Start->Run, typing cmd, and hitting enter. Then, use the cd command to change to the directory where you wish to store the picture, and perform your wget. By default, it will store the pictures in your current directory unless you specify a different location.

Also, with that command line you should be able to specify just the base URL, not a specific picture, to download all the images. That's what the -A option specifies.

phoebus

Posted 2009-12-01T09:22:38.797

Reputation: 3 811

The question stated that there was a progress bar meaning that it did run successfully. – William Hilsum – 2009-12-01T09:37:12.637

1I never suggested it didn't...it just sounds like he ran it directly from the Run dialog box, since he talks about a DOS window appearing then disappearing. – phoebus – 2009-12-01T09:49:43.970

Sorry, I just meant from what your first line, it sounded like you implied that the command prompt needed to be open to run wget. – William Hilsum – 2009-12-01T10:54:59.487

1

The other answers should be correct, but there is also the possibility of finding the image file (lang2.JPG was your example, above) using Windows' search feature.

pavium

Posted 2009-12-01T09:22:38.797

Reputation: 5 956

Thank you, but I found that the folder is created and the file is downloaded, but later it gets removed. If you have time and desire to know the details and can comment on that, please refer to the details I added above. – brilliant – 2009-12-01T16:33:57.527

1

Your lang2.JPG is rejected because that is what you requested by using the -A option. According to wget, .jpg is different from .JPG and therefore the file is discarded. Here's the command line you tried:

wget -r -A ".jpg,.gif,.png" http://...

Try it without -A:

wget -r http://...

That will download everything, including any .html files (which you may also find useful). Plus, it won't reject any files.

Greg Hewgill

Posted 2009-12-01T09:22:38.797

Reputation: 5 099

(1) Thank you for this advice, Greg!!! I tried this line: wget –r http://<the site’s name>/ lang2.JPG It worked this time!!! It did create the folder, downloaded the picture into it, and the picture DID NOT disappear! However, when I tried this one: wget –r http://<the site’s name> it didn’t do anything. I only got these lines in the command window: HTTP request sent, awaiting response… 403 Forbidden 2009-12-02 09:54:33 ERROR 403: Forbidden Why is it so that when I download a particular picture – brilliant – 2009-12-02T02:31:11.690

(2) from this site, it is not forbidden, but when I want to download all the files automatically, it is forbidden? I think this thread is already becoming too big, and it’s probably hard to read, so I will ask this as a new question. Te title of the question will go like this: “Why does wget download specific files, but can't download them all at once?” – brilliant – 2009-12-02T02:32:07.383

0

For me (clean install, nothing changed and no explicit download dir given), it was:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\WinWget

Xan-Kun Clark-Davis

Posted 2009-12-01T09:22:38.797

Reputation: 397

0

wget saved file to C:\Users\myuserid\AppData\Local\VirtualStore\Program Files (x86)\GnuWin32\bin even though I ran it from a different directory.

user202871

Posted 2009-12-01T09:22:38.797

Reputation: 1