How to modify the file name in batches? [Using Excel and DOS Command Methods]
It is very simple to modify the file name in batches on your Windows computer. Select all the files, press F2, and enter a descriptive text.
Windows will add a unique sequence number to each file name.
This is a fairly quick solution, but it is not very flexible, because you can't customize the way it is modified.
For example, how do you add the current date to the file name? Or do you want to replace a few words or characters in the file name (such as a misspelling)? Or you want the file to be modified according to a different rename system, like file-A.jpg instead of the default file(1).jpg.
In order to effectively modify the file name in batches, you can learn some somewhat complicated shell programming languages (SED, AWK, Perl) or simpler, just use a spreadsheet and several dos commands.
1: Click the "Start" menu in the lower left corner of Windows, select "Run", type cmd, and press Enter to enter the command line.
2: Use the cd command to go to the folder directory where you want to modify the file name in batches. For example, here, I want to enter the pics folder in the C drive.
cd
cd pics
3: Enter dir /b You can see a list of all the files in the current folder directory.
Enter dir /b > pics.xls to output the list to the pics.xls spreadsheet.
4: Interesting things are starting now. Open the Excel or Google Docs spreadsheet and you will see the list of files in the first column.
5: In the next blank column, add a corresponding function function formula - for example, use SUBSTITUTE to modify the characters specified in the file name, use CONCATENATE() and DATE() in the file name Add the date, and so on.
6: Select the + plus sign in the lower right corner of the B1 cell and drag down so that our formula will be copied to all rows.
Now, your original file name is in column A, and you want to replace the file name with column B - we will now convert them to the rename command in
in DOS.
In column C, enter the Excel formula:
=CONCATENATE("ren ",A1, " ", B1)
Click the function's checkmark to confirm that the input is correct. , drag to the + plus sign in the lower right corner and apply to all rows.
7: Select the C column, click "Copy", in the C disk pics folder directory, create a rename.bat file, paste the copied content into it.
8: Now we have basically finished. Enter the command rename.bat under C:pics and press Enter. You will find that the file names in the pics directory have all been modified in the way you expect.
When the system of our computer is used for a long time, the system garbage will be more and more, a
Do not display settings of recent documents, delete settings of recent documents: Step 1. Open the S
The default menu for computer startup is black and white. Can you change the startup menu to color?
I recently found that my hard disk read and write speed has become very slow, hard disk read and wri
Recommended system default service off
How to remove the desktop icon with shadow? Teach you to solve it easily (1)
How do I delete a computer system boot entry?
Computer hard disk data recovery method (1)
How to use SRS Premium Sound in detail
Android tablet CPU overclocking skills
Which processes can be shut down on the computer? (a)
What does NTFS format partition mean? What are the benefits of ntfs partitioning?
My document hidden secrets and features (a)
Let text documents automatically record open date and time
Comprehensive analysis of the communication volume setting in Win7 system sound
WinXP desktop how to find the lost camera icon
What should I do if the Win7 printer prompts that the RPC server is unavailable?
Win10 IE browser can not open the web two ways to solve the problem
Set Windows invisible password Secret login dual system
How to build a website environment under Win7 Ultimate
Linux switch path usage guide guide
Create a personalized super recycle bin in Windows