Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for x, value in enumerate(dirs):
- source = value
- for jpgFile in glob.glob(os.path.join(source, "*.jpg")):
- if os.path.isfile(jpgFile):
- shutil.move(os.path.abspath(jpgFile), destination)
- os.rmdir(value)
- --------------------------------------------------
- for x in range(len(dirs)):
- source = dirs[x]
- for jpgFile in glob.glob(os.path.join(source, "*.jpg")):
- if os.path.isfile(jpgFile):
- shutil.move(os.path.abspath(jpgFile), destination)
- os.rmdir(dirs[x])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement