Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copying several files into new folder

Tags:

python

copy

I have a folder containing several text files. How would I go about using python to make a copy of everyone of those files and put the copies in a new folder?

like image 406
user1558881 Avatar asked Nov 29 '25 04:11

user1558881


1 Answers

import shutil
shutil.copytree("abc", "copy of abc")

Source: docs.python.org

like image 56
Nick Eaket Avatar answered Nov 30 '25 18:11

Nick Eaket



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!