In the day-to-day management of files, we often encounter scenes where the file name contains a lot of extra numbers, perhaps an automatically generated serial number or a temporary date stamp. These numbers affect our multi-faceted management of files, hinder our search and classification, and also reduce the intuitiveness of file names.
Deleting the number in the file name is already a widespread demand of most users, but manual renaming and modification are applicable in the case of a small number of files. If it is a large number of files, how can it save time and effort?
Why do I need to delete all the numbers in the file name?
- After the date and mark numbers in the file name have lost their value, these numbers can be deleted in batches in order to keep the file displayed concisely and intuitively.
- Deleting redundant numbers in file names helps to avoid interference with file information caused by numbers when the number of files is too large, and can quickly find and classify.
- When multiple people operate and manage files, deleting the numbers in the file name can quickly clarify the contents of the file and improve the efficiency of file management.
Preview of the effect after deleting the numbers in the file name
before treatment:
after treatment:
method 1: Use HeSoft Doc Batch Tool Remove all digits from the file name
recommend index:★★★★★
Advantages:
- support thousands, tens of thousands of files batch processing, do not worry about the efficiency of processing files.
- All files are processed locally and do not involve uploading files to protect user privacy.
Disadvantages:
- only install software to operate on a computer.
Operation steps:
1. Open 【 HeSoft Doc Batch Tool ], select [File Name]-[Delete Text in File Name]].
2. You can choose [Add File] or [Import File from Folder] to import the file that needs to delete the number, or you can drag it in directly. After checking that there is no problem with the added file, click Next.
3. Select [All Numbers] under the operation type of the processing option. There are also many types of processing file names. You can also use them according to your own needs. Click Next again. Then select the location to save the file after the processing is completed.
4. After waiting for the processing to end, click the red path to open the folder to view the renamed files.
Method 2: Use the Windows. bat file to delete all the numbers in the file name
recommend index:★★★☆ ☆
advantages:
- native support for Windows systems with no additional software installed.
- Faster processing speed, suitable for a large number of files in a folder.
Disadvantages:
- it is more difficult for users who are not familiar with the computer system to operate.
- Files in subfolders cannot be processed, only files in a single folder can be processed.
Operation steps:
1. Create a new txt text file in the folder containing the files to be processed and rename it to "remove_numbers.bat".
2. Right-click this file to edit and enter the code below:
@echo offsetlocal enabledelayedexpansion
for %%f in (*) do (
set "filename=%%~nf"
set "newname=! filename:0= !! filename:1= !! filename:2= !! filename:3= !! filename:4= !! filename:5= !! filename:6= !! filename:7= !! filename:8= !! filename:9=! "
ren "%%f ""! newname! %%~xf"
)
3. After saving, double-click to run and start processing the file.
Method 3: Use the PowerShell command to delete the numbers in the file name
recommend index:★★★★☆
advantages:
- Windows original ecological support, and can use regular expression operation, matching more accurate.
- Can process files in subfolders within a folder.
Disadvantages:
- knowledge of basic system operations is required, and learning costs are high.
- More complex rule directives require long scripts.
Operation steps:
1. Select the folder containing the files to be processed, hold down the Shift key and the right key, and select [Open PowerShell Window Here]].
2. Enter the name below and press Enter:
Get-ChildItem | Rename-Item -NewName { $_.Name -replace '\d',''}
3. If you want to add subfolders, add [-Recurse] parameters:
Get-ChildItem -Recurse | Rename-Item -NewName { $_.Name -replace '\d',''}
summary
compared with manually renaming each file to delete all the numbers in the file name, which of the above methods can greatly improve the efficiency of processing files, save our time and energy, and avoid errors and omissions caused by manual operation. Encountered this kind of problem friends to try the above method!