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

版权声明:本文为博主原创文章,转载请注明来源 https://blog.csdn.net/qq_26948675/article/details/89487879
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)   

猜你喜欢

转载自blog.csdn.net/qq_26948675/article/details/89487879