[英]Unzipping multiple files matching criteria and moving to another location - Python
[英]moving files from multiple locations to a single location using Python
我有一长串来自多个文件夹的文件,到目前为止,我希望将它们全部放在一个位置:
import os
import shutil
dest_folder = 'C:\\dest_folder'
files = [
'file1.csv', 'file2.csv',
'file3.csv',
]
for f in files:
shutil.copy(f, 'dest_folder')
这对我不起作用,我似乎无法弄清楚为什么,任何帮助都会很棒,谢谢
我对这种东西不是很熟悉,但我不确定你是否打算在最后加上引号中的“dest_folder”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.