From bb1713c63fb8ffe42a67a86eacf86ba94fa56b60 Mon Sep 17 00:00:00 2001 From: url Date: Sun, 19 Jul 2026 17:15:54 +0100 Subject: [PATCH] add file scanner - lesson 02 --- learning/02-file-scanner/scanner.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 learning/02-file-scanner/scanner.py diff --git a/learning/02-file-scanner/scanner.py b/learning/02-file-scanner/scanner.py new file mode 100644 index 0000000..f846545 --- /dev/null +++ b/learning/02-file-scanner/scanner.py @@ -0,0 +1,8 @@ +import os +if __name__ == "__main__": + for root, dirs, files in os.walk("/home/url/repos/ou-python"): + for file in files: + full_path = os.path.join(root, file) + if os.path.getsize(full_path) > 100: + print(full_path, os.path.getsize(full_path)) + \ No newline at end of file