How to quickly batch modify file names

Source: Internet
Author: User

Step 1: Click on the Start menu in the lower left corner of Windows, select "Run", enter CMD, and enter the command line.

Step 2: Use the CD command to enter the folder directory where you want to bulk modify the file name. For example here, I want to enter the pics folder in C drive.

Cd

CD pics

Step 3: Enter dir/b you can see a list of all the files under the current folder directory.

Enter dir/b > Pics.xls to export the list to the Pics.xls spreadsheet.

Step 4: Interesting things are now only beginning. Open the Excel or Google Docs spreadsheet, and you'll see a list of the files just now in the first column.

Step 5: In the next blank column, add a corresponding function formula--for example, use substitute to modify the characters specified in the file name, use CONCATENATE () and date () to add a date to the file name, and so on.

Step 6: Select the + plus sign in the lower-right corner of cell B1 and drag down so that our formulas will be copied to all rows.

Now, your original file name is in column A, and you expect the file name to be replaced in column B--we'll now turn them into DOS rename commands.

In column C, enter the Excel formula: =concatenate ("Ren", A1, "", B1), click on the function's checkmark, confirm that the input is correct, drag to the lower right corner of the + Plus, apply to all lines.

Step 7: Select column C, click "Copy", in the C-Drive Pics folder directory, create a Rename.bat file, paste the contents of the copy.

Step 8: Now we have basically finished. Enter the command Rename.bat under C:pics, then enter, and you will find that the file name in the pics directory has been modified in the way you intended.

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.