When processing various files, we often encounter various dates mixed in file names, such as file names in 2024-01-01_XXX.docx, 2025-02-02_XXX.xlsx and other formats. As time goes by, the number of files stored by the computer will increase, so the files will be chaotic, and it will be especially difficult to find the required files. At this time, we can use regular expressions to quickly delete the complicated date content in batches, let the file name only have specific content. Using regular expressions to batch remove the year, month, and date in file names is applicable under multiple scenarios. For example, when sorting out old files, removing unnecessary dates can enable us to quickly match file types. When preparing a new round of files, removing the old date in the template file name can enable us to directly use the files again. When a team project needs unified file naming at a stage, the first step is to delete the date in front of the file name. In the above scenario, the reasonable use of regular expressions can quickly delete the date at the beginning of all file names in batch with one click, avoid manual deletion of files one by one, and help us significantly improve work efficiency. So how should we use regular expressions to delete the year, month, date and other contents in front of a large number of file names in batch?
1. Use Scenarios
when sorting out old files, many dated files lose their validity period, and keeping them will affect the search of other files. At this time, we can use regular expressions to quickly remove the date at the beginning of the file name in batches to improve our work efficiency.
2. Effect preview
before treatment:
after treatment:
3. Operation steps
open 【HeSoft Doc Batch Tool], select [File Name]-[Find and Replace Keywords in File Name]].

[Add File] autonomously add files that need to delete the beginning date of the file name.
Import Files from Folder Imports all files in the selected folder.
You can view the imported files below.

[Find Method] Click to use the formula to find the text.
[List of keywords to be searched] Enter the regular expression as shown in the figure below. \d{4} represents year, followed by 2 consecutive \d{2} represents month and date.
[Replaced Keyword List] If you leave blank below and do not enter it, it means delete.

When processing is complete, click on the red path behind the save location to view the deleted file.
