Like me, you may have seen some nice wallpapers on your Windows 10 lock screen automatically downloaded from the Internet. These are Windows Spotlight wallpapers, and they’re described by Microsoft as follows:
Windows Spotlight is an option for the lock screen background that displays different background images and occasionally offers suggestions on the lock screen. Windows Spotlight is available in all desktop editions of Windows 10.https://docs.microsoft.com/en-us/windows/configuration/windows-spotlight
To my understanding, these are typically photographs and images found online and curated by Microsoft in some fashion. In the event that these images are removed by Microsoft in future updates, I wanted to preserve them for later use. To do that, I wrote a simple little Batch script that copies all of the images (including non-wallpapers) from this Windows Spotlight assets folder:
As I mentioned earlier, there are also images in this folder that are not wallpapers. To remove them from our saved copies, the script includes a line that automatically deletes any images copied that are smaller than 151kb. This usually ends up including app icons from the Microsoft Store.
The script I whipped up is as follows. Change the highlighted portions to suit your needs:
ECHO OFF REM -- Prepare the Command Processor SETLOCAL ENABLEEXTENSIONS SETLOCAL ENABLEDELAYEDEXPANSION REM -- your code goes here copy "C:\Users\USERNAME\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets\*." "\PATH\TO\DESTINATION\*.jpg" ECHO Deleting files we copied that are smaller than 151kb, since they're likely just app icons from the Micro$oft $tore REM -- delete files in wallpaper directory that are less than "151kb" file size PUSHD "\PATH\TO\DESTINATION\" for %%j in (*) do if %%~zj lss 151000 del "%%~j" POPD REM -- End of application GOTO:EOF
Sure, I could just save the wallpapers manually, or go online to find some, but there’s something satisfying about writing a little bit of script to handle your light work. I add the .bat file to Task Scheduler (use ‘Create Task’, instead of ‘Create Basic Task’ to avoid obtuse Last Run Result errors). I don’t know how many of these wallpapers I’ll amass, but I like not having to think about it, and there’s also some pleasure in browsing them from time-to-time, finding the right wallpaper to suit my mood.