📜  cp python 代码示例

📅  最后修改于: 2022-03-11 14:46:55.801000             🧑  作者: Mango

代码示例2
import shutil

source = r"C:\Users\tsmehra\dev\example\demo.txt"
destination = r"D:\example2"

print("The demo.txt has copied at:")
print(shutil.copy(source, destination))

Output

The demo.txt has copied at:
D:\example2\demo.txt