Rename Multiple files with in Dos batch file

后端 未结 3 836
时光取名叫无心
时光取名叫无心 2020-12-18 06:04

I wish to rename all files inside the folder *.txt, so the result will be \"1.txt\", \"2.txt\" and \"3.txt\", ....

How can I do so?

3条回答
  •  眼角桃花
    2020-12-18 06:10

    First make a directory listing:

    dir /b *.txt > myfile.cmd
    

    Then start up UltraEdit (http://www.ultraedit.com/) and open the file.

    Then go into column mode, select all lines, and:

    • insert "RENAME " in the beginning of every line
    • insert ".TXT" at the end of every line (be sure to put it far enough right in case you have very long lines)
    • insert a number (see Column / Insert Number in the menu) right before .TXT

提交回复
热议问题