Microsoft Website has a good selection of HD Wallpapers. However, it’s hard to click on each image and download individually. There are some ways to bulk download images using some software tools or browser extensions but either those tools are confusing to me or require purchase to download files without any limitations. So, I was determined to find a better way.
You’ll need Linux. In my case I used my Ubuntu Server.
The page where all the wallpapers are is this.
First we need to get all anchors in that page. There are several methods. You can download the webpage in an HTML file and use a tool to extract links. Here, I’m going to use a neat trick using Lynx. I’ll use Lynx to dump all the links found on the page, and then use standard Linux tools (grep and cut) to get the links we really want.
Speaking of relevant links, the general pattern I found on MS website for image links is:
I found that all the links contain word “main”. That’s what I’m going to use as the keyword to extract only the relevant links. Of course, you can be a bit more precise, and use a pattern like “resX.windows.microsoft.com” or whatever you feel like.
So here’s my command to get all the image links
lynx -dump -listonly http://windows.microsoft.com/en-us/windows/wallpaper?T1=all | cut -d ‘ ‘ -f 2 | grep main > wallpapers.txt
A quick check for wallpapers.txt reveals that we have 248 images
cat wallpapers.txt | wc -l
However, we have duplicates! So we need to remove the duplicates
sort wallpapers.txt | uniq > wallpapers_nodups.txt
Now we’ll have about 124 wallpapers ready to download.
Next, I simply use wget to download all images in the file
wget -i wallpapers_nodups.txt
This will take a few minutes depending upon your internet speed but you will get all the wallpapers! In my case it took under 3 mins to download 124 wallpapers.
Finally, I will move these wallpapers to a shared location that’s accessible from my Windows machine.
NOTE: this trick was used to bulk download wallpapers from Microsoft’s website. With a little bit of modification you bulk download any file from any website.
UPDATE: Trick 2 to download 4K wallpapers. Read here
3 thoughts on “Trick: Bulk Download 100+ Wallpapers from Microsoft Website”