Tip: Add or modify file suffix name in batches under Win7/Win8/Win10

  
        Usually we modify or add the suffix name of a single file by right-clicking on the file - rename, 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.
ren D:\\1.jpg 2.png
Note that if the prompt permissions are insufficient, then you need to run the command prompt as an administrator.
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:
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 the jpg file suffixes in the D drive to png, the command is:
ren D:\\*.jpg *.png
If you often need to modify the suffix in batches, you can put the following two The command is copied to the txt text file:
cd /d %~dp0
ren * *.jpg
After saving, change its suffix txt to 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