From 60458b59201d38b22922501bab124dcdfe30bcd0 Mon Sep 17 00:00:00 2001 From: Rei Date: Thu, 7 Dec 2023 16:12:35 +1100 Subject: [PATCH] Add Completion message and delay before close of window --- MSLockscreenWallpaperGrabber.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MSLockscreenWallpaperGrabber.py b/MSLockscreenWallpaperGrabber.py index 40d1683..8f42d30 100644 --- a/MSLockscreenWallpaperGrabber.py +++ b/MSLockscreenWallpaperGrabber.py @@ -3,12 +3,13 @@ import os import shutil +import time -#Set the source and destination directories (Replace \ with / before imputting) +# 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 +# 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) @@ -17,3 +18,8 @@ for file_name in os.listdir(source): for filename in os.listdir(destination): os.rename(destination + filename, destination + filename + '.jpg') +# Print message stating code has executed sucsessfully +print ("Task completed succsessfully, please look at destination folder for results.") + +# Delay closing of window by 5 seconds +time.sleep(5)