Bulk modify Excel file names with batch processing

Source: Internet
Author: User
Tags command line

Windows ERA, we used to click on the mouse, click to complete the task, the former veteran of the commonly used command line seems to have gone into the end. The Ministry of Public Security, the use of command lines, batch processing and even scripts, will give us a daily computer to bring unexpected convenience. Let's use batch, command line, and script to modify the Excel file name in batches

In order to meet the needs of his son 10 minutes before bedtime, while not giving his career too much toil, I downloaded 52 stories of the world's fairy tales 660 minutes of soundtrack readings. But after this fairy tale is unpacked, the MP3 file name is Fs001.mp3, Fs002.mp3. Copy directly to the phone to play? From the filename is not clear which fairy tales, fortunately, it also comes with a text file, the original filename should be 1, Snow White, 2, the daughter of the Sea

Use copy-paste one by one to modify the file name? Too much trouble, and finally I use batch processing plus Excel to solve this problem perfectly.

SETP1: Prepare with Excel

The original fairy tale file name is also a rule, I open the Excel table, in the A1 cell input ren (renaming instructions), in the B1 input the original filename fs001, and fill to 52 lines. then enter. mp3 In C1, C2, F1, F2, and fill up to 52 lines. Then copy the fairy tale name from the text file containing the list of fairy tales file names and paste it into column E. Next, combine columns B and c to column D and merge E and F data to column G to get the full name of the file.

Finally, the data in column D and G are combined to selectively paste the purge formula once. Down to clear the B, C, E, f column data, and delete the C and F columns, the form and DOS the same command line data table.

SETP2: Generating Batches

Copy Excel table data, open Notepad to paste into it, you will find Ren and Fs001.mp3 and 1, Snow White. There's a lot of spacing between mp3. Mom is a tab, then replace them all with a look and replace the panes, so that the DOS command rules, Finally save it in batch file and save it to 52 pieces of world fairy tales 660-minute soundtrack recitation in this folder, the name is 1.bat.

SETP3: Start renaming

Into 52 World fairy tales 660-minute soundtrack recitation in this folder, double click to execute 1.bat, and immediately you can name all the fairy tale files that match the content.

PS: Original file name if there is no rule, you can open the Command Line window, enter the file save directory, use the dir command to extract the list of file names. The specific instructions are such as Dir *.mp3/b/o:n>wjm.txt.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.