From d11fb8c10080885f54fa13c8b3dce457c9b16123 Mon Sep 17 00:00:00 2001 From: Rei Date: Thu, 7 Dec 2023 02:39:43 +1100 Subject: [PATCH] Upload Python Script --- MSLockscreenWallpaperGrabber.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 MSLockscreenWallpaperGrabber.py diff --git a/MSLockscreenWallpaperGrabber.py b/MSLockscreenWallpaperGrabber.py new file mode 100644 index 0000000..71554e1 --- /dev/null +++ b/MSLockscreenWallpaperGrabber.py @@ -0,0 +1,16 @@ +import os +import shutil + +#Set the source and destination directories (Replace \ with / before imputting) +source = 'C:/Users/User/AppData/Local/Packages/Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy/LocalState/Assets' #Replace "User" with your username +destination = '*INSERT USER DIRECTORY HERE* (Example: C:/Users/User/Pictures/Wallpapers/)' + +#Copy files from the system directory to a directory of the user's choice +for file_name in os.listdir(source): + if file_name.endswith(''): + shutil.copy(os.path.join(source, file_name), destination) + +# Append .jpg to end of file name (Windows doesn't do this automatically) +for filename in os.listdir(destination): + os.rename(destination + filename, destination + filename + '.jpg') +