Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- for root, dirs, files in os.walk("myDir"):
- for file in files:
- if file.endswith(".jpg"):
- print(os.path.join(root, file))
- import os
- for root, dirs, files in os.walk("myDir"):
- for file in files:
- if file.contains("string1" & "string2"):
- print(os.path.join(root, file))
Add Comment
Please, Sign In to add comment