简体   繁体   中英

How would I write a batch file which will name files in a directory like Windows Explorer auto rename?

In windows explorar we can select multiple files in a folder and rename them sequally, but I want to do the same thing with batch skript

change this

     A.mp4
     B.mp4  
     C.mp4
     DD.mp4 

to this

     (1).mp4
     (2).mp4   
     (3).mp4
     (4).mp4   

Try this instead:

ren C:\Path\beforefilename.mp4 afterfilename.mp4

Example:

ren C:\Path\A.mp4 (1).mp4

Result is Filename A.mp4 changed to (1).mp4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM