rem 在桌面创建新的文件夹
if not exist C:\Users\Public\Desktop\wallpaper md C:\Users\Public\Desktop\wallpaper
rem 复制win10聚焦壁纸到桌面的新文件夹
copy %localappdata%\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets C:\Users\Public\Desktop\wallpaper
rem 给壁纸文件重命名成图片格式
ren "C:\Users\Public\Desktop\wallpaper\*.*" *.jpg
rem 打开欣赏
start C:\Users\Public\Desktop\wallpaper
pause
WIN10的锁屏壁纸偶尔但又经常有几张特别对味的,所以想着实现壁纸自动化拖取并重命名。
上面的是带有注释,用于交流学习。
下面的直接复制粘贴到bg.txt另存为bg.bat,双击即可使用
@echo off
if not exist C:\Users\Public\Desktop\wallpaper md C:\Users\Public\Desktop\wallpaper
copy %localappdata%\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets C:\Users\Public\Desktop\wallpaper
ren "C:\Users\Public\Desktop\wallpaper\*.*" *.jpg
start C:\Users\Public\Desktop\wallpaper