Skip to content

Instantly share code, notes, and snippets.

@pirafrank
Created January 18, 2022 14:04
Show Gist options
  • Save pirafrank/363316192f2ffa68c741a3034f8f66a6 to your computer and use it in GitHub Desktop.
Save pirafrank/363316192f2ffa68c741a3034f8f66a6 to your computer and use it in GitHub Desktop.
Copy Windows 10 lockscreen background images to a subdir of YOURUSERNAME\Pictures. Subdir content will be replaced on each run.
Copy-Item -Force -Recurse $env:USERPROFILE\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets $env:USERPROFILE\Pictures\LockScreen_Wallpapers
Dir $env:USERPROFILE\Pictures\LockScreen_Wallpapers | rename-item -newname { [io.path]::ChangeExtension($_.name, "jpg") }
explorer $env:USERPROFILE\Pictures\LockScreen_Wallpapers
@pirafrank
Copy link
Author

you can use WSL to file each file and rename accordingly:

for filename in $(ls -1); do
if [ $(file $filename | grep -i jpg ) ]; then mv $filename "${filename}.jpg"; else mv $filename "${filename}.png"; fi; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment