If you want to save the background image of the login screen (lock screen interface), you can get it in one click with the following script:
@echo off
setlocal enabledelayedexpansion
:: Windows Spotlight lock screen image resource address
set "sourcePath=%localappdata%\Packages\.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets"
:: In order to save and view lock screen images, first set a folder that is easy to browse on a daily basis
set "targetPath=E:\Daily Screen_Lock"
:: Make sure the target path from the previous step exists
if not exist "%targetPath%" (
mkdir "%targetPath%"
)
:: Copy the file at the default location to the target path
xcopy /E /I "%sourcePath%" "%targetPath%"
:: Iterate through the files in the target folder and change the extension to JPG
for %%F in ("%targetPath%\*") do (
if not "%%~xF" neq "" (
ren "%%F" "%%~"
)
)
endlocal
echo Successfully obtained and changed to JPG format.
pause
Copy and paste the above script and save it as a .bat file, when you need to save the lock screen image, you just need to double-click and run it, you can go to the target folder to view the saved image (the specific target path can be customized and modified according to your personal preferences, here I am setting it directly under a subfolder in E disk: set "targetPath=E:\Daily Screen_Lock ")
PS: The source address in the%localappdata%
is an environment variable that, when expanded, is usuallyC:\Users\[Username]\AppData\Local
which[Username]
is the username of the currently logged in user. The script above uses the%localappdata%
It can simplify the steps for people to change their username when copying and pasting.