Use regular expressions to batch delete the date at the beginning of file names


Translation:EnglishFranƧaisDeutschEspaƱolę—„ęœ¬čŖžķ•œźµ­ģ–“ļ¼ŒUpdated on:2025-06-03 16:16


When handling various files, we often encounter file names mixed with various dates, such as 2024-01-01_XXX.docx, 2025-02-02_XXX.xlsx, etc. As time goes on, the number of files stored on the computer increases, leading to chaos and making it particularly difficult to find the required files. At this time, we can use regular expressions to quickly and batch delete the cumbersome date content at the beginning of file names, leaving only the specific content. Using regular expressions to batch remove the year, month, and day from file names is applicable in multiple scenarios. For example, when organizing old files, removing unnecessary dates allows us to quickly match file types; when preparing a new batch of files, removing the old dates from template file names allows us to reuse the files directly; when a team project reaches a stage where unified file naming is required, the first step is to delete the dates at the beginning of file names. In the above scenarios, reasonable use of regular expressions can quickly batch delete the dates at the beginning of all file names with one click, avoiding manual deletion of files one by one, and significantly improving work efficiency. So how should we use regular expressions to batch delete the year, month, and day content at the beginning of a large number of file names?

1态Usage Scenarios

When organizing old files, many files with dates have expired, and keeping them can affect the search for other files. At this time, we can use regular expressions to quickly batch remove the date at the beginning of file names to improve our work efficiency.

2态Preview

Before Processing:

image-Batch delete year,month,day from file names,how to batch delete text from file names,how to delete dates from file names

After Processing:

image-Batch delete year,month,day from file names,how to batch delete text from file names,how to delete dates from file names

3态Operation Steps

Open 怐HeSoft Doc Batch Tool怑, select 怐File Name怑 - 怐Find and Replace Keywords in File Names怑.

image-Batch delete year,month,day from file names,how to batch delete text from file names,how to delete dates from file names

怐Add File怑 Independently add files that need to have the starting date removed from the file names.

怐Import Files from Folder怑 Import all files from the selected folder.

Below, you can view the imported files.

image-Batch delete year,month,day from file names,how to batch delete text from file names,how to delete dates from file names

怐Search Method怑 Click to use formula fuzzy text search.

怐Keyword List to Find怑 Enter the regular expression as shown in the figure below. \d{4} represents the year, and the following two consecutive \d{2} represent the month and day.

怐Keyword List to Replace怑 Leave blank to indicate deletion.

image-Batch delete year,month,day from file names,how to batch delete text from file names,how to delete dates from file names

After processing is complete, click the red path behind the save location to view the files with deletion completed.

image-Batch delete year,month,day from file names,how to batch delete text from file names,how to delete dates from file names



Keyword:Batch delete year , month , day from file names , how to batch delete text from file names , how to delete dates from file names
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