How to modify the file name in batches? Batch modify photo file name and add prefix method

  

Our usually we use a mobile phone or camera to take a bunch of photos and copy them to the computer. The naming of the photos is usually random and chaotic. If you want to standardize the file naming, would you go to modify the file name one by one? In fact, there is no need to be so troublesome. Today, the computer Pepsi editor will teach you a quick and easy way to modify the photo file name and add a prefix method. The method is as follows.

How to modify the file name in batches?

First, put all the photo files in a folder, then press and hold the Ctrl + A combination shortcut on the keyboard to select all the photo files. When all are selected, press F2 to batch rename. And enter a new name, such as "geek youth" as shown below.

Ps. Notebook users, if you can't name the folder by pressing F2, please press Fn+F2 to combine shortcuts.

Second, after the input is completed, press the Enter key to confirm, the system will batchly name all the files you have entered, and will automatically add (1), (2), (3), (4) ... number serial number, to avoid all file names are the same, as shown below.

Adding prefix methods to photo file names in batches

If you want to keep the original file names of photo files, just need to add file prefixes in batches? The following small series will teach you a trick.

1. First create a new text document in the photo folder where you need to modify the file name in batches, then paste the following code into it:

[@echo off for /f "delims=" %%f in ('dir/b/s/ad *.*') do (if not "%%~nxf"=="%0" ren "%%f" "geek youth%% ~nxf")]

When finished, save this text file as and change the extension to bat format as shown.

Note: The geek youth in the code is the file prefix that needs to be added in batches. You can fill in according to your needs.

2, finally click to open the bat format file, run once, you can add the geek youth prefix to the prefix of all photo file names in the folder, the effect is as shown above.

The above is the batch modification of the file name and the method of adding prefixes to the file name in batches. The operation is very simple, not only suitable for photo files, but other files can also be named in batches by this method. This computer skill, support XP, Win7, Win8, Win10 and other mainstream Windows systems, need to batch processing pictures of friends, go try it, if you encounter problems, please contact us.

Copyright © Windows knowledge All Rights Reserved