Use regular expressions to bulk delete previous dates in file names


TranslationEnglishFrançaisDeutschEspañol日本語한국어Update Time2025-06-07 20:24:00xuco


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:

image-Batch delete file name date,file name how batch delete text,how to delete file name date

after treatment:

image-Batch delete file name date,file name how batch delete text,how to delete file name date

3. Operation steps

open 【HeSoft Doc Batch Tool], select [File Name]-[Find and Replace Keywords in File Name]].

image-Batch delete file name date,file name how batch delete text,how to delete file name date

[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.

image-Batch delete file name date,file name how batch delete text,how to delete file name date

[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.

image-Batch delete file name date,file name how batch delete text,how to delete file name date

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

image-Batch delete file name date,file name how batch delete text,how to delete file name date

KeywordBatch delete file name date , file name how batch delete text , how to delete file name date
Creation Time2025-06-03 13:45:35xuru

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!