From 8993f7a27d1efc9a74e900d692e90abe34bbe6bf Mon Sep 17 00:00:00 2001 From: Marc Partensky Date: Thu, 16 Jul 2020 17:17:26 +0200 Subject: [PATCH] no screenshots.py --- no-screenshots.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 no-screenshots.py diff --git a/no-screenshots.py b/no-screenshots.py new file mode 100644 index 0000000..614728e --- /dev/null +++ b/no-screenshots.py @@ -0,0 +1,19 @@ +import os +import shutil + +desktop_abs_path = "/Users/marcpartensky/Desktop" +images_abs_path = "/Users/marcpartensky/Pictures/Images" +files = os.listdir(desktop_abs_path) + +captures = [] + +for file in files: + if file.startswith('Capture'): + captures.append(file) + +while len(captures)>0: + source = os.path.join(desktop_abs_path, captures[0]) + destination = os.path.join(images_abs_path, captures[0]) + shutil.move(source, destination) + del captures[0] +