python 把一个文件夹的文件移动到另外一个文件夹

import os,shutil
import time
src_path='F:/oanda/'
target_path='D:/oanda/'
while True:
    time.sleep(3)
    file_list=os.listdir(src_path)
    if len(file_list)>0:
        for file in file_list:
            shutil.move(src_path+file,target_path+file)   
0
0

发表回复

Your email address will not be published. Required fields are marked *.

*
*