Skip to content

Instantly share code, notes, and snippets.

@shamilnabiyev
Last active June 19, 2019 19:48
Show Gist options
  • Save shamilnabiyev/fc40dfa7b0857b6b1267f607dd6cbb41 to your computer and use it in GitHub Desktop.
Save shamilnabiyev/fc40dfa7b0857b6b1267f607dd6cbb41 to your computer and use it in GitHub Desktop.
Move files and folder to another destination in python
new_dst = "new_dst_folder/"
for folder in os.listdir(basedir):
inner_path = basedir + folder + "/"
for file in os.listdir(inner_path):
shutil.move(os.path.join(inner_path, file), new_dst)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment