Somewhere, Something Incredible Is Waiting To Be Known !!!
(Move to ...)
Home
▼
Wednesday, 6 February 2019
Moving all files from one directory to another using Python
import shutil
import os
source = '/path/to/source_folder'
dest1 = '/path/to/dest_folder'
files = os.listdir(source)
for f in files:
shutil.move(source+f, dest1)
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment