Answers for "python copy images from one folder to another using OS"

1

copy image from one folder to another in python

import glob
import shutil
import os

src_dir = "your/source/dir"
dst_dir = "your/destination/dir"
for jpgfile in glob.iglob(os.path.join(src_dir, "*.jpg")):
    shutil.copy(jpgfile, dst_dir)
Posted by: Guest on November-27-2020

Code answers related to "python copy images from one folder to another using OS"

Python Answers by Framework

Browse Popular Code Answers by Language