Batch rename files (Excel + REN)

    Recently, some documents will be required at the time to organize your files to rename, of course, is the most direct way to "right-click - renamed - enter the name," but how can I do repeat such a high degree of content? So explore a "hard" approach.

This method requires a two-part operation: Excel in processing of the data, the use of Windows comes with "REN" command

Processing of the data in Excel

1. The need to modify the name of the file into Excel, we use Excel in the "Name Manager", name of manager at the Formulas tab, as shown:

2. The configuration properties, select Import directory

Refers to format path is: = the FILES ( "D:. \ Music * *")

Where D: \ music is your path, * *  is a wildcard, the wildcard means all of the file name. If only extract the Excel file can be modified to * .xls *, music files, it is * .mp3 *. Other so on.

3. definition name is completed, cells enter the formula: = INDEX (folders, ROW (A1))

Copy filling down to get a result, the error mask value To, IFERROR functions can be nested, form: = IFERROR (the INDEX (folders, ROW (A1)), " ")

4. We need to organize the data content of

A column is the old file name (including extension), B column is the new file name (including extension)

There now follows a file name in column A of corrections as a new file name, use some tips here, if you have data visible law, the first hand after the edit, press "Ctrl + E", the rest of the content it can auto-complete, in column C in the same way we complement

When you are ready to file name and the new file name, enter a critical step, enter in column C: The value of the value of REN A column B column (three-part two intermediate English have a space), Ctrl + E to generate other cells content.

说明一下,这是DOS语句,用语言描述就是 REN  空格 旧文件名  空格 新文件名。这个命令直接在控制台中也可以使用,可以修改名字,后缀等内容,也可以修改指定路径内容,具体格式大家自行百度。

利用Windows中自带的“REN”命令

在需要修改名字文件的目录下新建一个txt文件,将我们Excel中C列的内容复制,粘贴到txt文件中保存。随后将txt文件的扩展名改为 .bat 

最后,“右击—以管理员身份运行”你就会发现文件夹中文件已经重命名完成

发布了40 篇原创文章 · 获赞 10 · 访问量 7104

Guess you like

Origin blog.csdn.net/xyzyhs/article/details/104236386