Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python copy all files in a folder to nother folder

import shutil
import os
 
# path to source directory
src_dir = 'fol1'
 
# path to destination directory
dest_dir = 'fol2'
 
# getting all the files in the source directory
files = os.listdir(src_dir)
 
shutil.copytree(src_dir, dest_dir)
 
PREVIOUS NEXT
Tagged: #python #copy #files #folder #nother #folder
ADD COMMENT
Topic
Name
4+2 =