How do I modify the text in a file name in bulk? In our daily life and work, we often need to modify file names. Sometimes, we need to bulk replace a group of files with the same text in the file name to better manage and find them. This batch replacement of file names can help us save time and energy, and avoid the trouble of manually modifying file names one by one. Mastering this skill is very useful, both on a PC and at work. As a person who has been in the workplace for more than ten years, it is highly recommended that you learn this computer operation skill, because this skill may help you improve your work efficiency in the future.
Using his own work experience and external search, he summarized two methods for you, the first method needs to be completed with the help of a software that modifies the file name in batches, and the second method is operated by the method of command. The steps are more detailed, and the purpose is to help you learn quickly. Okay, without further ado, let's follow the steps and give it a try.
Method 1: Use the "Uber File Batch Rename" software to modify it in batches
Step 1, install the "Uber File Batch Rename" software tool on your computer**, open it and click the [File Rename] function on the home page to enter the inner page for specific operations.
Step 2: After going to the operation interface of the software, click the [Add File] text button to import all the files that need to modify the name into the software, and save the file name to a folder after preparing the file name in advance, which will be easier to operate.
Step 3, Finally, the settings window appears on the left, and the naming method is selected as "Replace". Enter the text to the right of "Find Content" that needs to be modified; Enter the modified text to the right of Replace Content.
Step 4, the new file name column on the right can check the effect of the setting to see if it is the effect we want.
Step 5, After all the settings are completed, directly click the red button in the upper right corner of the software to start the batch renaming process, and wait until the names of all files are modified, and the software will pop up the prompt box of "Rename Successful".
Step 6, as shown in the figure below, you can see that we changed the word "file" to "data" in all file names at once.
Method 2: Use command scripts to process the process
To modify part of the text in the file name in bulk, you can use the command line or batch script. Here are two common methods:
1. Use the command line (for Windows, Mac, and Linux):
Open a command prompt (Windows) or a terminal (Mac and Linux).
Go to the directory that contains the file name you want to modify. You can use the cd command to switch to the target directory, for example:
cd /path/to/directory
Use the following command to modify file names in bulk:
for file in *old_text*; do mv "$file" "$"; done
Among them,"old_text"is part of the text to be replaced"new_text"is the new text after the replacement.
For example, if you want to add all the file names in"abc"Replace with"xyz", you can use the following command:
for file in *abc*; do mv "$file" "$"; done
After the command is executed, the"old_text"Part will be replaced with"new_text"。
2. Use batch scripts (only for Windows):
Create a new text file and copy and paste the following ** into the file:
echo off
setlocal enabledelayedexpansion
set "old_text=abc"
set "new_text=xyz"
for %%f in (*old_text%*)do (
set "filename=%%f"
ren "!filename!" "!filename:%old_text%=%new_text%!"
Among them,"old_text"is part of the text to be replaced"new_text"is the new text after the replacement.
will"old_text"with"new_text"The value is modified to what you want.
Save the file as a batch script file (e.g., rename files.).bat)。
Double-click the Run Batch Script file and it will modify the file names in bulk in the same directory.
Whichever method you use, make sure to provide the right one"old_text"with"new_text"value and back up important files before the operation.
After you finish reading the two articles shared above for you, "How to modify the text in the file name in batches?" I believe that you can quickly solve similar problems in your future work. Modifying file names in batches is the best way to improve work efficiency, I believe everyone has this feeling, I hope it can help you with this kind of problem. That's all for sharing, thank you for your support, remember to like and support after learning