Home  >  Q&A  >  body text

data-mining - Python中如何实现文件的批量自动命名

工作中遇到这样一个问题。有N多个文件。要按照a-1,a-2,3,b-1,b-2,b-3。。。。这样命名大量文件,用于序列比对。请问,在Python中如何实现?谢谢

PHP中文网PHP中文网2763 days ago557

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-17 11:45:43

    Automatic naming can only be done if there are rules. If there are no rules, it will not work. You can only write them one by one into the python script, and then os.rename

    reply
    0
  • Cancelreply