Last active
July 25, 2023 04:51
-
-
Save benok/e8ef50acf19297cce7b774fe73749abf to your computer and use it in GitHub Desktop.
Save Windows Spotlight cache images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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