I am trying to connect to a Sharepoint site and fetch Excel workbooks from a specific folder. The issues I am having are mainly that wget is fetching files from every single level. Here is the code I am using:

wget --http-user='someuser' --http-password="somepassword" -r -l 1 --no-remove-listing 
"http://somehost.com/lvl1/lvl2/lvl3/lvl4/lvl5/lvl6/" -nd --cut-dirs 5 --random-wait

Where lvl6 is the directory in which my files sit. What this command does is it pulls all the files under lvl1 to lvl6. I tried getting around this by adding

--accept xlsx --reject aspx

to the end of the command (since most extraneous files are aspx). But weirdly, this just causes wget to fetch just one index.html file instead.

So far, I have tried changing the number of recursive levels (0 to 20), adding --no-parent, and some other options that did not work out. Any ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.