1 import os 2 import shutil 3 print(os.getcwd())#当前文件所在的目录,D:// 4 os.chdir("C:\\Users\\Administrator\\Desktop") 5 print(os.getcwd()) 6 # os.makedirs("0512/16") 7 print(os.listdir("C:\\Users\\Administrator\\Desktop")) 8 shutil.copyfile("C:\\Users\\Administrator\\Desktop\\学习资料\\MySQL.docx","D:\\MySQL.docx")