Python copy folder

Python copy folder

Requirements:
1. src_path ='C:/Users/zxx/Desktop/try'
2. target_path ='C:/Users/zxx/Desktop/try1'
3. Package as a function

Insert picture description here
Note that mode ='rb', binary, otherwise an error will be reported

What should I do if there are not only specific files but also folders in my current folder?
Make a recursive call

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_44994799/article/details/110074819