将旧的文件夹内的文件copy到另一个文件夹内。
old_file_path和new_folder_path为文件的绝对路径。
import shutil
def copyfile(old_file_path,new_folder_path): shutil.copy(old_file_path, new_folder_path)
if __name__ == '__main__':
old_file_path='D:\test\1.pdf'
new_file_path='D:\test2'
copyfile(old_file_path,new_folder_path)