Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. for x, value in enumerate(dirs):
  2.     source = value
  3.     for jpgFile in glob.glob(os.path.join(source, "*.jpg")):
  4.         if os.path.isfile(jpgFile):
  5.             shutil.move(os.path.abspath(jpgFile), destination)
  6.     os.rmdir(value)
  7.  
  8. --------------------------------------------------
  9.  
  10. for x in range(len(dirs)):
  11.     source = dirs[x]
  12.     for jpgFile in glob.glob(os.path.join(source, "*.jpg")):
  13.         if os.path.isfile(jpgFile):
  14.             shutil.move(os.path.abspath(jpgFile), destination)
  15.     os.rmdir(dirs[x])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement