Tom
Tom

Reputation: 3063

wget on Windows command line

Basically I'm trying to download images from a website using the following command (SwiftIRC is an easy example to use):

wget.exe -r -l1 -A.png --no-parent www.swiftirc.net/index.php

This command works fine, however one of the ways I am trying to do it isn't working. When I fire up an elevated command prompt, default to windows\system32.

If I use to following two commands everything works fine:

cd c:\users\tom\downloads\\

wget.exe -r -l1 etc. etc.**

The images are saved in the folder www.swiftirc.net in my downloads folder. However if I try to do this in one line like this:

c:\users\tom\downloads\wget.exe -r -l1 etc. etc.

The response from wget on the cmd is exactly the same, but the images are not saved on my hard disk.

Does anyone know what I'm doing wrong?

Upvotes: 5

Views: 24066

Answers (2)

joanluc
joanluc

Reputation: 1

I beleive it's because windows doesn't allow users to write files on the disk root, when you run "c:\users\tom\downloads\wget.exe" you have C:\ as a working directory so the files should be saved there but it's not allowed by the common strategies

Upvotes: 0

Vinnie
Vinnie

Reputation: 3929

Try adding c:\users\tom\downloads\ to PATH or put wget.exe into your windows/system32 folder.

Upvotes: 2

Related Questions