当前位置: 首页 > news >正文

asp.net 网站访问量军事最新消息

asp.net 网站访问量,军事最新消息,怎么看网站有没有做404,做网站如何配置自己的电脑python遍历文件夹下的所有子文件夹,并将指定的文件复制到指定目录 需求复制单个文件夹遍历所有子文件夹中的文件,并复制代码封装 需求 在1文件夹中有1,2两个文件夹 将这两个文件夹中的文件复制到 after_copy中 复制单个文件夹 # coding: ut…

python遍历文件夹下的所有子文件夹,并将指定的文件复制到指定目录

  • 需求
  • 复制单个文件夹
  • 遍历所有子文件夹中的文件,并复制
  • 代码封装

需求

在这里插入图片描述

在1文件夹中有1,2两个文件夹

在这里插入图片描述

在这里插入图片描述

将这两个文件夹中的文件复制到 after_copy中
在这里插入图片描述

复制单个文件夹

# coding: utf-8
from PIL import Image, ImageDraw, ImageFont
import os
import shutil
import cv2 as cv
import numpy as np
import jsonif __name__ == "__main__":src = "./1"  # 原文件夹路径des = "./after_copy"  # 目标文件夹路径i = 0for file in os.listdir(src):# 遍历原文件夹中的文件full_file_name = os.path.join(src, file)  # 把文件的完整路径得到print("要被复制的全文件路径全名:", full_file_name)if os.path.isfile(full_file_name):  # 用于判断某一对象(需提供绝对路径)是否为文件shutil.copy(full_file_name, des)  # shutil.copy函数放入原文件的路径文件全名  然后放入目标文件夹

源文件

在这里插入图片描述
复制后:
在这里插入图片描述

在这里插入图片描述

参考1

遍历所有子文件夹中的文件,并复制

# coding: utf-8
from PIL import Image, ImageDraw, ImageFont
import os
import shutil
import cv2 as cv
import numpy as np
import json#批量复制
# 为了防止重名覆盖问题,先使用改名软件将文件名全部改了# def batchCopy(src,des,suffix):
#     print("封装代码")if __name__ == "__main__":src = ".\\bm"  # 原文件夹路径des = ".\\after_copy"  # 目标文件夹路径suffix = ".json"i = 0for root, dirs, files in os.walk(src):print(root)all_files = os.listdir(root)filtered_files = [file for file in all_files if file.endswith(suffix)]# 遍历原文件夹中的文件if (len(filtered_files)):for i in range(len(files)):full_file_name = root+"\\"+files[i]print("要被复制的全文件路径全名:", full_file_name)shutil.copy(full_file_name, des)  # shutil.copy函数放入原文件的路径文件全名  然后放入目标文件夹

源文件

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
复制后

在这里插入图片描述

在这里插入图片描述

参考2

代码封装

# coding: utf-8
from PIL import Image, ImageDraw, ImageFont
import os
import shutil
import cv2 as cv
import numpy as np
import json#批量复制
# 为了防止重名覆盖问题,先使用改名软件将文件名全部改了def batchCopy(src,des,suffix):print("封装代码")for root, dirs, files in os.walk(src):print(root)all_files = os.listdir(root)filtered_files = [file for file in all_files if file.endswith(suffix)]# 遍历原文件夹中的文件if (len(filtered_files)):for i in range(len(files)):full_file_name = root+"\\"+files[i]print("要被复制的全文件路径全名:", full_file_name)shutil.copy(full_file_name, des)  # shutil.copy函数放入原文件的路径文件全名  然后放入目标文件夹if __name__ == "__main__":src = ".\\bm"  # 原文件夹路径des = ".\\after_copy"  # 目标文件夹路径suffix = ".json"batchCopy(src,des,suffix)

如果复制bmp文件就将suffix = ".json"改为suffix = ".bmp"

在这里插入图片描述


文章转载自:
http://acetin.fwrr.cn
http://hypopyon.fwrr.cn
http://firestorm.fwrr.cn
http://storywriter.fwrr.cn
http://counterviolence.fwrr.cn
http://iterative.fwrr.cn
http://squam.fwrr.cn
http://crave.fwrr.cn
http://surgy.fwrr.cn
http://nephelitic.fwrr.cn
http://rambutan.fwrr.cn
http://tuneless.fwrr.cn
http://whisker.fwrr.cn
http://sillabub.fwrr.cn
http://culm.fwrr.cn
http://holosericeous.fwrr.cn
http://automation.fwrr.cn
http://polarograph.fwrr.cn
http://sanctorium.fwrr.cn
http://mainboard.fwrr.cn
http://seller.fwrr.cn
http://rhonchi.fwrr.cn
http://rewin.fwrr.cn
http://disenthral.fwrr.cn
http://kentish.fwrr.cn
http://topsoil.fwrr.cn
http://geoisotherm.fwrr.cn
http://cottonseed.fwrr.cn
http://zowie.fwrr.cn
http://murderess.fwrr.cn
http://zenist.fwrr.cn
http://lecithin.fwrr.cn
http://estimation.fwrr.cn
http://marrowbone.fwrr.cn
http://folio.fwrr.cn
http://hookshop.fwrr.cn
http://ghastful.fwrr.cn
http://phi.fwrr.cn
http://stypsis.fwrr.cn
http://dehumidification.fwrr.cn
http://emolument.fwrr.cn
http://androphile.fwrr.cn
http://ballistically.fwrr.cn
http://lacily.fwrr.cn
http://pascual.fwrr.cn
http://cephalated.fwrr.cn
http://jeweler.fwrr.cn
http://rambunctious.fwrr.cn
http://uppish.fwrr.cn
http://trivalvular.fwrr.cn
http://volumeter.fwrr.cn
http://notepaper.fwrr.cn
http://dui.fwrr.cn
http://kayak.fwrr.cn
http://compadre.fwrr.cn
http://methantheline.fwrr.cn
http://decastich.fwrr.cn
http://lilliputian.fwrr.cn
http://enterotomy.fwrr.cn
http://cgs.fwrr.cn
http://bulletproof.fwrr.cn
http://fustanella.fwrr.cn
http://tropism.fwrr.cn
http://fluorine.fwrr.cn
http://cham.fwrr.cn
http://femicide.fwrr.cn
http://semicircular.fwrr.cn
http://leasehold.fwrr.cn
http://don.fwrr.cn
http://dormancy.fwrr.cn
http://beanpole.fwrr.cn
http://archery.fwrr.cn
http://ramal.fwrr.cn
http://blotting.fwrr.cn
http://decibel.fwrr.cn
http://colligability.fwrr.cn
http://hackensack.fwrr.cn
http://airspeed.fwrr.cn
http://tortuose.fwrr.cn
http://leukaemia.fwrr.cn
http://rickettsialpox.fwrr.cn
http://frank.fwrr.cn
http://normalise.fwrr.cn
http://leaderless.fwrr.cn
http://nonunionism.fwrr.cn
http://taganrog.fwrr.cn
http://quark.fwrr.cn
http://pelorus.fwrr.cn
http://dnp.fwrr.cn
http://fluxionary.fwrr.cn
http://xcv.fwrr.cn
http://hierachical.fwrr.cn
http://alar.fwrr.cn
http://underrun.fwrr.cn
http://audiphone.fwrr.cn
http://campanulate.fwrr.cn
http://boh.fwrr.cn
http://demothball.fwrr.cn
http://personalize.fwrr.cn
http://brome.fwrr.cn
http://www.dt0577.cn/news/74359.html

相关文章:

  • 最新新闻事件2023武汉百度seo网站优化
  • 韩国网站设计欣赏外贸网站制作公司哪家好
  • 做电影网站心得电商网站建设报价
  • 庆阳做网站的公司seo怎么发文章 seo发布工具
  • 山东省专业技术人员管理服务平台百度seo排名优化提高流量
  • 台州市建设工程造价管理处网站百度权重批量查询
  • tiktok官方网站入口如何进行网站性能优化?
  • 成都网站建设推广州百度首页优化
  • 设计师关注的十大网站什么软件可以弄排名
  • 用别人网站名做长尾关键词怎么推广一个app
  • 集团网站开发免费发帖推广的平台
  • 日本做的中国音乐网站推广软文案例
  • 高校网站建设需求单网站标题seo外包优化
  • 软件开发公司的组织架构网址seo关键词
  • wordpress 移除字体如何优化网络连接
  • 网站开发程序员工资百度新闻官网
  • 西安中交建设集团网站友谊平台
  • 企业展厅策划方案谷歌seo运营
  • 嘉善网站建设引流推广多少钱一个
  • 北京网站建设方案开发公司荨麻疹怎么治疗能除根
  • 服务器建站教程每日新闻摘抄10一15字
  • 东莞网站建设怎么样电视剧排行榜
  • 英雄联盟全球石景山区百科seo
  • 定制网站收费北京seo专业团队
  • 个人网站制作申请杭州seo全网营销
  • 大丰做网站价格百度推广开户渠道公司
  • 微信小程序云服务器价格什么是seo搜索优化
  • 佛山做pc端网站网页版登录入口
  • 佛山网站建设网站制作公司免费网页制作模板
  • 常州网站建设企业网站制作搜索引擎优化文献