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.
#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.
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.
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
##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 5. Comparison before and after batch renaming
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!