如何批量获取文件路径

 1 import glob
 2 
 3 import os
 4 
 5 def image_proc():
 6 
 7       for files in glob.glob('/home/xxx/filename/*.png')
 8 
 9             filepath , filename = os.path.split(file)   //获取文件路径 , 图片名
10 
11             filterame , exts = os.path.splitext(filename)
12 
13             outfile = '/home/xxx/' //输出文件路径
14 
15            

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2022-01-13
  • 2022-12-23
  • 2022-01-28
猜你喜欢
  • 2021-12-06
  • 2021-07-19
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
相关资源
相似解决方案