What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-02 07:24:07
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) Add solution -
Python 2021-10-29 19:37:15
Deleting a file using python
import os import shutil if os.path.exists("demofile.txt"): os.remove("demofile.txt") # one file at a time os.rmdir("test_directory") # removes empty directory shutil.rmtree("test_directory") # removes not empty ... Add solution -
Python 2021-10-18 15:14:03
python change file location
shutil.move(source, destination) Add solution -
Python 2021-10-16 21:37:05
copyfile pyhon
from shutil import copyfile copyfile(src, dst) Add solution -
Python 2021-10-14 23:37:07
python os copy
from shutil import copyfile copyfile(src, dst) Add solution