How to delete parentheses in file batch renaming under Windows

2018-9-13 12:16 Originated from this website 15,267 three eleven
[Abstract]

In Windows, renaming all files will generate files with the same name and serial number in batch, but there is a pair of parentheses outside the serial number. How can I delete these parentheses?

Sometimes, in order to tidy up a large number of files, we will rename these files in batches. The easiest way is: Select All - Rename - OK! Then you will see that these files will be renamed in the form of "new name (serial number)", which can instantly make the chaotic folders neat and unified.

However, a new problem arises: although the new name comes with its own serial number, the brackets outside the serial number (such as img (1). jpg) are redundant in many cases. How can we quickly delete these brackets? Try this batch command

Windows下怎么删除文件批量重命名中的括号

Quickly delete parentheses in batch renaming

1. Create a new text document in the folder where the batch renamed files are located. The name is optional, such as "Delete Brackets. txt"

2. Open it with Notepad or other editors, put in the following characters, and save

 @Echo Off&SetLocal ENABLEDELAYEDEXPANSION FOR %%a in (*) do ( set "name=%%a" set "name=! name: (=! " set "name=! name:)=! " ren "%%a" "! name! " ) exit

3. Modify the suffix of the document to. bat, such as "delete parenthesis. txt" to "delete parenthesis. bat" (the display file suffix needs to be set)

4. Double click the mouse to execute the bat batch command. Wait a moment to see that the brackets in the file name have been removed (the waiting time is related to the number of files)

Is it very convenient? This processing method is much more efficient than manual modification one by one.

This article was last updated on September 13, 2018, and has not been updated for more than one year. If the article content or picture resources are invalid, please leave a message for feedback, and we will deal with it in a timely manner. Thank you!

If you think this article is helpful, please sponsor this website

 Alipay scanning sponsorship WeChat scanning sponsorship

  • Alipay scanning sponsorship
  • WeChat scanning sponsorship
  • Statement: All text, pictures and other materials marked "Original on this site" are copyrighted Yaxi All, welcome to reprint, but please indicate the source;
    Current comments: 3 of which: visitor 0 blogger 0
    Loading
    1. Five years ago (2018-09-28) 0F

      Reprinted, thanks for sharing with the blog, it is very necessary

    2. Gui'an Service Trade one
      Five years ago (2018-09-27) 0F

      Thank you for your collection

    3. Five years ago (2018-09-17) 0F

      Ha ha, DOS BAT (batch processing) is awesome! 20 years ago!

    Comment

     doubt  naughty  Sad  Pick one's nose  scare  smile  lovely  A bad laugh  surprised  Daze  doubt  Soldiers  Snicker  Curse  Anger  roll one's eyes  applause  proud  Wipe away sweat  kiss  Cry  open the mouth and show the teeth  halo  strong

    share three eleven 15,267
    Top