S
S
SuperZombie2021-01-21 00:27:39
Python
SuperZombie, 2021-01-21 00:27:39

Copy python append folder?

I have a folder (let's call it SYSTEM for example). And there is a second folder, which contains a folder with files.
The SYSTEM folder contains many files and folders.
I want to copy (or move) from the second folder this folder with files to SYSTEM.
At the same time, so that if such a file exists, it is overwritten. If not, before was added.
I tried to do it via shutil. But he writes that such a folder already exists and does not allow copying.
Is there any way to bypass this error?
Roughly speaking, I need to drag and drop one folder into another in Windows, replacing those files that are repeated. (but only with Python)
6008a0d49172c645758878.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MinTnt, 2021-01-21
@MinTnt

Through..
os.rename('path/papka/, 'path/system/')
...you can also transfer files
But, I found a similar question

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question