![](/img/trans.png)
[英]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.