Batch modify file suffix name skills under Win7, Win8, Win10

  

Usually we modify or add the suffix name of a single file by right-clicking —— rename on the file, but if we need to modify the suffix name of multiple files, this is obviously too cumbersome. At this time, try the Windows ren (rename) command, which is simple and easy to remember. If you have the opportunity to show your hand in front of your friends, the silk will instantly become a technical emperor.

The Ren command can be used to modify the name of a file, including the suffix name. For example, to rename the 1.jpg in the D drive to 2.png, just type the following command at the command prompt and press Enter.


Copy the code
The code is as follows: ren D:\\1.jpg 2.png

Note, if the prompt permission is insufficient, then you need to be an administrator. Run a command prompt.

If you want to modify the suffix name in bulk, you can use wildcards to achieve. For example, the command to change the suffix name of all files in the D drive to jpg is:


Copy the code
The code is as follows: ren D:\\* *.png

If you only want to modify one type of file (with the same suffix name) to another type, for example, change all jpg file suffixes in the D drive to png, the command is:


< u>Copy the code
The code is as follows: ren D:\\*.jpg *.png

If you often need to modify the suffix in batches, you can copy the following two commands into the txt text file:


Copy the code
The code is as follows: cd /d %~dp0</p><p>ren * *.jpg

Save the suffix txt after saving For bat. In the future, you only need to put the bat file and the file to be modified into the same directory, and then run the bat file as an administrator to change the file suffix name in the directory to jpg. As shown below:

Copyright © Windows knowledge All Rights Reserved