Python批量移动文件到指定目录

path_out = 'D:\\Desktop\\个人\\账单审计\\微信支付\\zip\\'
    file_name_list = os.listdir(path_out)

    for i in file_name_list:
        file = os.listdir(path_out+i+"\\")
        shutil.move(path_out+i+"\\"+file[0], path_out)

    原文作者:壹零万联
    原文地址: https://blog.csdn.net/javazyw/article/details/122579007
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞