python move file to new directory code example
Example 1: python how move file to directory
import shutil, os
files = ['file1.txt', 'file2.txt', 'file3.txt']
for f in files:
shutil.move(f, 'dest_folder')
Example 2: python move file
import os, shutil
#move picture.png from /some/dir/ to /another/dir/Pictures/
shutil.move('/some/dir/picture.png', '/another/dir/Pictures/')