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)

5
1

                                    import shutil
import os

os.chdir('source_image_dir_path')
dst_dir = "your_destination_dir_path"
for f in os.listdir():
    shutil.copy(f, dst_dir)

5 (1 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
copy image file from one folder to another in python copy to another directoryimages python copy all images from one directory to another python how to copy image from one directory to another direcry in python copy image to another folder python python copy image from folder to another python include copy image from folder to another copy images from two directories python how to copy images from one directory to another in python copy all images from one folder to another in python write images from one folder to another in python copy image file from one folder to another in python and not duplicate files copying image from a folder to another with python l copying image from a folder to another with python linux python copy image from one folder to another python copy image to another folder copying specific images from directory to directory python python copying some photos from directory copy a one image from one directory to another in python A Python program to copy an image file into folder copy an image to another directory python copy image from one folder to another folder in python copy image from another folder in python how to copy image from one folder to another in python paste two images from different folder python paste two images from different folder python paste images from different folder python copy certain images from one folder to another in python copy images with exact name from one folder to another in python copy image from folder python python copy image file from one directory to another copy images from one folder to another in python python copy images from one folder to another copy file to another directory python copy one folder to another in python python copy image to another directory copy only jpg files python copy files from one folder to another using python copy some images in a directory python copy 90% images in a directory python python program to copy an image to another folder copy a file from one location to other in python copy file from one path to another in python how to copy image from one file to another python python copy pic to folder command python code to copy file from one directory to another copy file from one directory to another in python os copying file from one directory to another python python copy a file from one folder to another how to copy a folder to another place using python how to copy certian list of images into another folder python copy file from one directory to another python python script to copy files from one folder to another copy file from one folder to another python copy image from one folder to another in python
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source