Python 通过文件名批量移动文件

https://stackoverflow.com/questions/28913088/moving-files-with-wildcards-in-python

1 import glob
2 import shutil
3 import os
4 for data in glob.glob("C:\\11\\A*"):  # 原始地址
5     if not os.path.isdir(data):
6         shutil.move(data,"C:\\2\\")   # 目标地址

 

相关文章:

  • 2021-05-29
  • 2021-11-27
  • 2021-11-29
  • 2021-12-30
  • 2021-06-18
  • 2021-10-10
  • 2021-05-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案