You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
256 B

  1. import os
  2. path = '/home/robot/image/'
  3. prev_files = []
  4. files = []
  5. # r=root, d=directories, f = files
  6. for r, d, f in os.walk(path):
  7. for file in f:
  8. if '.jpg' in file:
  9. files.append(os.path.join(r, file))
  10. for f in files:
  11. print(f)