Skip to content

Instantly share code, notes, and snippets.

@SteveGilham
Created June 24, 2020 09:20
Show Gist options
  • Save SteveGilham/0e4d7ca7560852d3800289465d727249 to your computer and use it in GitHub Desktop.
Save SteveGilham/0e4d7ca7560852d3800289465d727249 to your computer and use it in GitHub Desktop.
Copying windows spotlight images
# where the images are
$assets = Join-path $env:userprofile "AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets"
# regularly refreshed screen images are recent
$weeks = new-object system.timespan (14,0,0,0)
# copy those files locally and apply '.jpg'
dir $assets | ? { $_.LastWriteTime -gt ([datetime]::now - $weeks) } | % { copy $_.FullName "$($_.Name).jpg" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment