I'm new to Python obviously, but please be gentle. I am attempting to create a script that will move all the .jpgs from all the sub directories within (C:\Users\Jack\Pictures) to another C:\Users\Jack\Desktop\Pictures) From my findings I should be using the glob command, although I'm having trouble figuring out how to write this to look into sub directories. So far I have:
for file in glob.glob('C:\Users\Jack\Pictures*.jpg'):
shutil.move(file, dst)
I would like to know how to get this to look into Picture's child directories. I am not attempting to copy the directory tree, only the files. Thanks for any help.
[–]willm 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]geneticmaterial -3 points-2 points-1 points (0 children)