Home  >  Article  >  What should I do if a ren command error occurs during batch rename?

What should I do if a ren command error occurs during batch rename?

coldplay.xixi
coldplay.xixiOriginal
2021-04-14 15:27:5817946browse

The solution to the ren command error when batch renaming occurs: first create a new text document and paste the ren command generated in Excel into it; then save it as, first select the type as all files, and then rename it [ren.bat] ;Finally double-click to execute the [ren.bat] file.

What should I do if a ren command error occurs during batch rename?

#The operating environment of this article: Windows 7 system, Dell G3 computer.

Solution to the ren command error when batch renaming:

1. Get all the file names that need to be renamed. The operation is as follows:

①Right click on shift , open the command line window in the current folder;

②Enter [dir /b >OldName.txt], and you can paste it to the command line with the right mouse button.

What should I do if a ren command error occurs during batch rename?

2. Fill in the old and new file names in Excel. The operation is as follows:

① Create a new Excel file and fill in the first column in OldName.txt All names;

② Fill in the corresponding new name in the second column, which can be filled in manually or generated by Excel function. For example, if you want to sort the files numerically, you can fill in the number in column G, let B1 =G1&" "&A1, and drag it down to fill it.

What should I do if a ren command error occurs during batch rename?

3. Generate ren commands in batches in Excel. The operation is as follows:

①Enter English double quotes in column C;

② Let E1 ="ren "&C1&A1&C1&" "&C1&B1&C1

③ Drag downward to complete the filling

What should I do if a ren command error occurs during batch rename?

##4. Execute multiple lines generated by batch file Command, operate in the current folder:

① Create a new text document and paste the ren command generated in Excel into it;

② Save as: first select the type as all files, and then change the name ren.bat

③ Double-click to execute the ren.bat file

What should I do if a ren command error occurs during batch rename?

5. Comparison before and after batch renaming

What should I do if a ren command error occurs during batch rename?

If you want to know more about free learning, please pay attention to the php training column!

The above is the detailed content of What should I do if a ren command error occurs during batch rename?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn