Skip to content

Instantly share code, notes, and snippets.

@benok
Last active July 25, 2023 04:51
Show Gist options
  • Save benok/e8ef50acf19297cce7b774fe73749abf to your computer and use it in GitHub Desktop.
Save benok/e8ef50acf19297cce7b774fe73749abf to your computer and use it in GitHub Desktop.
Save Windows Spotlight cache images
#!/bin/sh
# Save Windows Spotlight cache images
# (execute from Git-bash, please)
CACHE_DIR=${LOCALAPPDATA}/Packages/Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy/LocalState/Assets
DEST_DIR=~/Pictures/WindowsSpotlight
mkdir -p $DEST_DIR
cd ${CACHE_DIR}
for f in $(file * | grep JPEG | grep 1920x1080 | awk '{print $1}' | tr -d :); do
cp -p $f $DEST_DIR/$(echo $f | cut -b 1-10).jpg
done
start $DEST_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment