SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. 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'm using wget 1.10.2 which doesn't have the auth problem, what I'm getting is when I run:

wget --user=myname --password=pwd

it only downloads an aspx file which is the page's content.

How could I download the exact files?

share|improve this question
what is your script environment? – Steve B Jul 19 '12 at 10:31
script environment? I'm using windows xp, and using wget for windows the version of wget is 1.10.2 – shengy Jul 23 '12 at 1:25

You can tell wget to follow links, only go one level deep and not visit external sites. You do however need to have links to the documents on the page you start with otherwise it won't grab the files. Remember wget is essentially a html scraper, it isn't going to be able to view the contents of SharePoint as a directory unless rendered like that on the page.

share|improve this answer
wget -r -l 1 -A doc this will miss some files. Don't know why, I solved the problem using chrome's Download Master plugin. – shengy Jul 23 '12 at 1:28

I solved it this way :

  1. Installed export cookies add-on for my browser,
  2. Logged into the Sharepoint website
  3. Exported the cookie into a file named cookie.txt
  4. then run the following command line with wget :

    wget --cookies=on --load-cookies cookies.txt --keep-session-cookies -m 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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