很多时候,当您从Internet下载文件或从(Internet)USB驱动器复制文件时,命名格式并不总是您所期望的。对于在数码相机上捕获的图像文件尤其如此,因为它们通常具有不描述任何内容的名称(DSC_01.jpg没有告诉我有关图像的任何信息)。
虽然您始终可以轻松地重命名文件,使它们具有有意义的名称,但手动为大量文件这样做并不理想。如果您手动执行该任务,您将需要很长时间才能根据自己的喜好重命名所有这些图像。
幸运的是,如果您使用Mac(Mac),这项任务不会那么乏味。Mac具有内置和第三方方式,可以一次快速轻松地重命名一堆文件(quickly and easily rename a bunch of files at once)。只需(Just)将您的文件交给Mac,它就会按照您想要的方式重命名它们。
在 Mac 上使用 Finder 批量重命名文件(Using The Finder To Batch Rename Files On Mac)
到目前为止,您可能已经使用Finder重命名(Finder)Mac上的单个文件,但在重命名文件时,它可以做的还不止这些。Finder是使用批量重命名文件(batch rename files)功能构建的,因此您无需使用Finder 以外(Finder)的任何工具来为文件命名。
该功能不会隐藏在任何地方,并且一直位于您的上下文菜单中。让我们快速揭示它,看看它能为您做什么。
在Mac上的(Mac)Finder中打开要批量重命名的文件所在的文件夹。
打开文件夹后,选择所有要重命名的文件。按Command + A全选或使用Command按钮进行自定义多选。
右键单击(Right-click)这些文件中的任何一个,您会在上下文菜单中找到一个选项,显示重命名 X 个项目(Rename X Items)(其中 X 是您选择的文件数)。点击(Click)它。
与通常的重命名效果不同,您将看到一个对话框,让您指定要重命名文件的方式。以下是为您简要解释的每个选项:
替换文本(Replace Text)- 这使您可以找到现有文本并将其替换为您喜欢的内容。
添加文本(Add Text)- 它允许您在当前文件名之前或之后附加文本。
格式(Format)- 在这里您可以格式化命名,例如您可以包含自定义文本,然后为您的文件名增加数字等等。
单击重命名(Rename)按钮后,您会看到所有选定的文件现在都有新的名称。效果是即时的,因此您不必等待文件被重命名。
使用 Automator 应用程序批量重命名文件(Using An Automator App To Bulk Rename Files)
内置的Finder方法在批量重命名文件方面做得很好,但当您想将某些预选名称应用于文件时,它可能不是理想的解决方案。
在这种情况下,Automator应用程序将是一个不错的选择,因为您可以使用您选择的名称预先自定义它,然后只需将文件扔到该应用程序中即可重命名文件(throwing files at this app to rename the files)。
在 Mac 上启动Automator应用程序,选择工作流(Workflow)作为新文档,然后单击选择(Choose)按钮。它可以让您创建用于重命名文件的应用程序。
在以下屏幕上,您需要向工作流程添加操作。在操作列表中搜索名为Get Selected Finder Items的操作并将其拖到您的工作流程中。
您需要添加到工作流程中的另一个操作称为重命名 Finder Items(Rename Finder Items)。也将其拖到您的工作流程中。
添加第二个操作时,系统会询问您是否要在文件重命名之前对其进行复制。选择不添加(Don’t Add),它将重命名您的原始文件。
以下屏幕是您定义文件命名方式的地方。从不言自明的下拉菜单中选择适当的选项。(Select)自定义此部分后,通过点击File和Save来保存工作流程。
为您的应用程序输入一个有意义的名称,从文件格式(File Format)菜单中选择应用程序(Application),然后单击保存(Save)。
要使用新创建的应用程序重命名文件,只需选择所有要重命名的文件并将它们拖放到Finder中的应用程序上。
自定义Automator应用程序将(Automator)使用您的预定义选项(rename your files using your pre-defined options)立即重命名您的文件。
如果您想让应用程序更易于访问,您可以将其拖放到您的Dock上。然后,您可以将文件拖到Dock中的应用程序上进行重命名。
使用第三方应用程序批量更改文件名(Using A Third-Party App To Bulk Change File Names)
在大多数情况下,以上两种方法将为您完成工作。但是,如果您对重命名文件有特殊要求,您可能需要使用第三方应用程序来完成该任务。
Mac有许多应用程序可帮助您批量重命名计算机上的文件,您可以使用其中任何一个来完成任务。在这里,我们展示了如何使用Transnomino应用程序。
- 下载应用程序并将其移至Mac上的(Mac)Applications文件夹。然后启动应用程序。
- 将(Drag)您要重命名的所有文件从Finder中拖放到应用程序中。您的文件将出现在列表中。
- 使用顶部的下拉菜单选择您希望如何批量重命名文件。您可以替换文本、前缀文本,甚至使用正则表达式来更改文件名。最后,当您对您的选择感到满意时,单击顶部的重命名以执行重命名的实际任务。(Rename)
使用此应用程序重命名文件的好处在于,它甚至在您点击重命名按钮之前就显示了最终结果。这样您就可以知道文件名的外观,并且可以根据需要修改它们。
结论(Conclusion)
以前,一次重命名一大堆文件非常困难,因为没有可用的批量重命名功能。但是,如今,大多数操作系统都至少内置了一项功能,可帮助您一次性更改多个文件名。
How To Bulk Rename Files On Your Mac
Many times when you download filеs off the Internet or you copy files from a USB drive, the naming formats aren’t always what you expесted. This is еspecially true for the image files captured on digital cameras as they often have nаmes that don’t desсribе anything (DSC_01.jpg tells me nothing about the image).
While you can always easily rename your files so they have meaningful names, doing so for a large number of files manually isn’t ideal. It’s going to take forever for you to rename all of those images to your liking if you do the task manually.
Fortunately, the task won’t be as much tedious if you use a Mac. The Mac has both built-in as well as third-party ways to quickly and easily rename a bunch of files at once. Just give the Mac your files and it’ll rename them the way you want.
Using The Finder To Batch Rename Files On Mac
So far you may have likely used the Finder to rename single files on your Mac but it can do more than that when it comes to renaming files. The Finder is built with the batch rename files feature so you don’t need to use anything but the Finder to give a new name to your files.
The feature isn’t hidden anywhere and it’s been sitting in your context menu all this time. Let’s quickly reveal it and see what it can do for you.
Open the folder where the files to be batch renamed are located in the Finder on your Mac.
When you’ve opened the folder, select all the files that you’d like to rename. Press Command + A to select all or use the Command button to make custom multiple selection.
Right-click on any one of those files and you’ll find an option saying Rename X Items (where X is the number of files you’ve selected) in the context menu. Click on it.
Instead of the usual rename effect, you’ll get a dialog box that lets you specify the way you want to rename your files. Here’s each of the options explained briefly for you:
Replace Text – this lets you find an existing text and replace it with something of your liking.
Add Text – it lets you append text before or after the current file name.
Format – here you can format the naming such as you can include a custom text followed by an increasing number for your file names and so on.
Once you’ve clicked the Rename button, you’ll see that all of your selected files now have your newly given names. The effect is instant so you won’t have to wait for your files to be renamed.
Using An Automator App To Bulk Rename Files
The built-in Finder method does a great job at bulk renaming your files but it may not be an ideal solution when you want to apply certain pre-selected names to your files.
In this case, an Automator app will be a good choice as you can pre-customize it with your chosen names and then it’s just a matter of throwing files at this app to rename the files.
Launch the Automator app on your Mac, select Workflow as a new document, and click on the Choose button. It’ll let you create your app for renaming files.
On the following screen, you’ll need to add an action to your workflow. Search for the action named Get Selected Finder Items in the actions list and drag it over to your workflow.
Another action you’ll need to add to your workflow is called Rename Finder Items. Drag it over to your workflow as well.
When you add the second action, you’ll be asked if you’d like to make copies of your files before they’re renamed. Select Don’t Add and it’ll rename your original files.
The following screen is where you define how you want to name your files. Select appropriate options from the self-explanatory dropdown menus. Once you’ve customized this part, save the workflow by hitting File followed by Save.
Enter a meaningful name for your app, select Application from the File Format menu, and click on Save.
To rename files with the newly created app, simply select all the files to be renamed and drag and drop them onto the app in Finder.
The custom Automator app will instantly rename your files using your pre-defined options.
If you want to make the app more accessible, you can drag and drop it onto your Dock. You can then drag your files onto the app in the Dock for renaming.
Using A Third-Party App To Bulk Change File Names
In most cases, the above two methods will get the job done for you. However, if you have special demands for renaming your files, you may want to use a third-party app to do the task.
There are a number of apps for the Mac to help you batch rename files on your machine and you can use any of those to do your task. Here we show how you can use the Transnomino app.
- Download and move the app to the Applications folder on your Mac. Then launch the app.
- Drag all the files you want to rename from the Finder and drop them onto the app. Your files will appear in the list.
- Use the dropdown at the top to select how you’d like to mass rename your files. You can replace text, prefix text, and even use regular expressions to change your file names. Finally, when you’re satisfied with your choice, click on Rename at the top to do the actual task of renaming.
The great thing about using this app to rename your files is that it shows the end result even before you have hit the rename button. This way you know how your file names are going to look like and you can modify them, if required.
Conclusion
Earlier it used to be very difficult to rename a whole bunch of files at once as there were no batch renaming features available. These days, though, most operating systems have at least one feature built into them to help you change your multiple file names in one go.