How to batch replace folder name multiple keywords? Share three efficient methods


TranslationEnglishFrançaisDeutschEspañol日本語한국어Update Time2025-07-16 17:57:10xuco


In daily file management, we encounter a large number of folder names that need to be modified in batches, such as the old name folders left after an enterprise or product upgrade that need to be updated, or the naming structure of the files that need to be unified. This article will tell you three ways to replace some words in the folder name, help you learn to master the efficient processing method of replacing multiple keywords in the folder name, and improve our file management efficiency. Come and operate it with me!

Under what circumstances will multiple specified characters be used in batch modification of folder names?

  1. When adjusting the naming standard within the enterprise, batch replacement of keywords in folder names can unify the format, make the structure of folders more consistent and intuitive, and facilitate our long-term management and search.
  2. When the project or department is adjusted, batch modification of some key contents in the folder name can avoid confusion of the old name and affect our work progress.
  3. During system upgrade and file backup migration, specific text content in folder names may conflict with the naming rules of the new system. Batch replacement of these keywords can ensure normal file recognition and use.

Preview of the effect after replacing some keywords in the folder name in batch

before treatment:

image-Folder batch renaming,folder name batch replacement text,how to batch modify folder partial names

after treatment:

image-Folder batch renaming,folder name batch replacement text,how to batch modify folder partial names

method 1: Use HeSoft Doc Batch Tool Batch Rename Folders

recommend index:★★★★★

Advantages:

  • can batch process thousands of files, and processing speed is good.
  • Files are processed locally and do not need to be uploaded, protecting user privacy throughout the process.

Disadvantages:

  • need to install software to operate on the computer.

Operation steps:

1. Open 【 HeSoft Doc Batch Tool ], select [folder name]-[find and replace keywords in folder name]].

image-Folder batch renaming,folder name batch replacement text,how to batch modify folder partial names

2. Click [Add Folder] to import the folder that needs to replace the keyword, or drag it directly below. After confirming that the added folder is correct, click Next.

image-Folder batch renaming,folder name batch replacement text,how to batch modify folder partial names

3. In the setting option interface, select [Accurate Text Search] under the search method, then enter the keyword to be replaced under the keyword list to be searched, enter the replaced keyword under the replaced keyword list, one by one, and click Next again after completion. Then click Browse to select the location to save the file after processing.

image-Folder batch renaming,folder name batch replacement text,how to batch modify folder partial names

4. After the processing is completed, click the red path in the red box to view the modified folder.

image-Folder batch renaming,folder name batch replacement text,how to batch modify folder partial names

Method 2: Use the Windows PowerShell script to replace some text in the folder.

recommend index:★★★☆ ☆

advantages:

  • native support for Windows systems, no need to install additional software.
  • Support regular expression matching rules, can handle large quantities of folders.

Disadvantages:

  • basic PowerShell knowledge is required.
  • Incorrect naming can result in unexpected renaming.

Operation steps:

1. Select the folder to be processed, hold down the Shift key and right mouse button, and select [Open PowerShell Window Here]].

image-Folder batch renaming,folder name batch replacement text,how to batch modify folder partial names

2. Enter the script below.

Get-ChildItem -Directory | Rename-Item -NewName { $_.Name -replace 'old name','new name'}

3. If you want to replace multiple key words at the same time, enter the script below.

$replacements = @{
'old name 1' = 'new name 1'
'old name 2' = 'new name 2'
'old name 3' = 'new name 3'
}
Get-ChildItem -Directory | ForEach-Object {
$newName = $_. Name
$replacements. GetEnumerator() | ForEach-Object {
$newName = $newName -replace $_. Key, $_. Value
}
Rename-Item -Path $_. FullName -NewName $newName
}

method 3: Use a Python script to automatically batch replace folder names with specified keywords

recommend index:★★☆ ☆ ☆

advantages:

  • ability to fully customize the logic of the replacement.
  • Suitable for complex batch renaming needs and can be integrated into automated workflows.

Disadvantages:

  • you need to learn Python programming, and the cost of learning is higher for unfamiliar users.
  • To run in the Python base environment.

Operation steps:

1. Create the Python script rename_folders.py.

import OS

replace_dict = {
'old name 1' = 'new name 1'
'old name 2' = 'new name 2'
'old name 3' = 'new name 3'
}

for folder in OS .listdir('.'):
if OS .path.isdir(folder):
new_name = folder
for old, new in replace_dict.items():
new_name = new_name.replace(old, new)
if new_name! = folder:
OS .rename(folder, new_name)
print(f"Renamed: {folder} → {new_name}")

2. Put the script into the target folder and run it.

python rename_folders.py

we reasonably use the above three methods to replace keywords in folder names in batches, allowing us to manage files efficiently and accurately. Users who have a very large number of folders to replace and need to perform such renaming tasks on a regular basis, we can use HeSoft Doc Batch Tool Or PowerShell scripts to make it easy for us to reuse quickly. Nowadays, with the complexity of various needs, the way we deal with it is also updating. Learning to master the above methods can better manage and utilize our digital files.


KeywordFolder batch renaming , folder name batch replacement text , how to batch modify folder partial names
Creation Time2025-07-16 13:46:26xuru

Disclaimer: The text, images, videos, etc., on this website are limited to the software version and operating environment used when creating this content. If subsequent product updates cause your operations to differ from the content on the website, please refer to the actual situation!

Related Articles

Don't see the feature you want?

Provide us with your feedback, and after evaluation, we will implement it for free!