Windows 10中重命名文件和文件夹的6种方法

您所在的位置:网站首页 如何快速对多个文件重命名并保存到文件夹 Windows 10中重命名文件和文件夹的6种方法

Windows 10中重命名文件和文件夹的6种方法

2024-06-01 16:27| 来源: 网络整理| 查看: 265

Windows 10 Hero Image

You can rename files on Windows 10 in many ways. If you’re still right-clicking and selecting “Rename” every time you want to change a file’s name, we’ve got some tips to make it faster.

您可以通过多种方式在Windows 10上重命名文件。 如果您仍要右键单击并在每次要更改文件名时选择“重命名”,我们将提供一些技巧来加快文件速度。

使用文件资源管理器重命名文件和文件夹 (Rename Files and Folders Using File Explorer)

Windows 10’s File Explorer is a powerful tool. Did you know that there are four separate ways to rename a file or folder built-in? There’s a keyboard shortcut that lets you rename a file or folder without having to click a mouse, too.

Windows 10的文件资源管理器是一个功能强大的工具。 您是否知道有四种单独的方法来重命名内置文件或文件夹? 有一个键盘快捷键,使您无需单击鼠标即可重命名文件或文件夹。

All methods using File Explorer to rename a file or folder work identically for both.

使用文件资源管理器重命名文件或文件夹的所有方法对于这两种方法都是相同的。

使用主菜单 (Using the Home Menu)

Fire up File Explorer by pressing Windows+E, and navigate to a directory with either a file or folder to rename.

通过按Windows + E启动文件资源管理器,并导航到包含文件或文件夹的目录以进行重命名。

Click on a file or folder to select it, and click “Rename” from the Home menu at the top of File Explorer.

单击文件或文件夹以将其选中,然后从文件资源管理器顶部的主菜单中单击“重命名”。

Click the file, and then click "Rename" from the Home menu at the top of the window.

Once the name is selected—if you’re renaming a file, not the file extension—you can start to type a new name. If you’ve configured File Explorer to show file extensions, make sure only to change the file name.

一旦选择了名称(如果要重命名文件而不是文件扩展名),则可以开始输入新名称。 如果已将文件资源管理器配置为显示文件扩展名 ,请确保仅更改文件名。

Type in the new name of the file and press Enter when you finish.

When you’re done typing, press Enter—or just click somewhere else—to save the new name.

输入完毕后,按Enter键或单击其他位置以保存新名称。

File renaming complete. 使用两次单击 (Using Two Single Clicks)

Fire up File Explorer by pressing Windows+E, and navigate to a directory with either a file or folder to rename.

通过按Windows + E启动文件资源管理器,并导航到包含文件或文件夹的目录以进行重命名。

Open File Explorer to the directory with a file or folder you want to rename.

Select the file with a single click, pause for a second, and then click one more time.

单击选择文件,暂停一秒钟,然后再单击一次。

Type the new name in and press the Enter key when finished.

After the name is highlighted, type out a new name, and press Enter to save the changes.

突出显示名称后,输入新名称,然后按Enter保存更改。

File name changed! 使用上下文菜单 (Using the Context Menu)

To rename a file from the context menu, right-click a folder, and click “Rename” from the context menu that appears.

要从上下文菜单重命名文件,请右键单击文件夹,然后从出现的上下文菜单中单击“重命名”。

Right-click the folder and click "Rename."

With the name of the folder highlighted, start typing out a new name, and press Enter when you finish.

在文件夹名称突出显示的情况下,开始输入新名称,然后在完成时按Enter。

Type in the new name and press Enter when finished. 使用键盘快捷键 (Using a Keyboard Shortcut)

If you prefer to use a keyboard shortcut, you can use one to highlight a file or folder’s name so you can rename it without using a mouse.

如果您更喜欢使用键盘快捷键,则可以使用它来突出显示文件或文件夹的名称,以便无需使用鼠标即可对其进行重命名。

Select a file or folder with the arrow keys, or start typing the name. Once the file is selected, press F2 to highlight the name of the file.

使用箭头键选择文件或文件夹,或开始输入名称。 选择文件后,按F2突出显示文件名。

Click the file once, wait a second, and then click the file again to highlight the name. Type a new name and press the Enter key when done.

After you type in a new name, press the Enter key to save the new name.

输入新名称后,按Enter键保存新名称。

File name changed successfully. 使用命令提示符重命名文件和文件夹 (Rename Files and Folders with Command Prompt)

If you feel more comfortable in the Command Prompt, you can use the ren command to rename files or folders with ease.

如果您对命令提示符感到更满意,则可以使用ren命令轻松地重命名文件或文件夹。

One of the fastest ways to open a Command Prompt in the desired directory is from File Explorer. First, open File Explorer and navigate to the destination. Click the address bar and type “cmd” in, and press the Enter key.

在所需目录中打开命令提示符的最快方法之一是从文件资源管理器中。 首先,打开文件资源管理器并导航到目标位置。 单击地址栏并输入“ cmd”,然后按Enter键。

Open File Explorer, type "cmd" into the address bar and press the Enter key.

To rename a file or folder, you can use the following command—if you’re renaming a folder, just omit the file extension:

要重命名文件或文件夹,可以使用以下命令-如果要重命名文件夹,则只需省略文件扩展名即可:

ren "current_filename.ext" "new_filename.ext"

Although the quotes aren’t mandatory, they’re required if either of the current or new names has a space in them. For example, to rename the file “Home Movies.ogv” to “First Birthday.ogv” you would use the following command:

尽管引号不是强制性的,但如果当前名称或新名称中都有空格,则必须使用引号。 例如,要将文件“ Home Movies.ogv”重命名为“ First Birthday.ogv”,可以使用以下命令:

ren "Home Movie.ogv" "First Birthday.ogv" Type the renaming command into the command line and press Enter to run the command. 使用PowerShell重命名文件和文件夹 (Rename Files and Folders with PowerShell)

Windows PowerShell is even more powerful and flexible than Command Prompt when it comes to renaming files and folders in a command-line environment. While we’ll only scratch the surface of naming your files, you can do some really powerful things, including piping cmdlets together to batch replace characters in a filename.

在命令行环境中重命名文件和文件夹时,Windows PowerShell比命令提示符更加强大和灵活。 尽管我们仅涉及命名文件的内容,但是您可以做一些非常有力的事情,包括将cmdlet一起管道传输以批量替换文件名中的字符。

The quickest way to open a PowerShell window at your desired location is to first open the folder in File Explorer. Once there, click File > Open Windows PowerShell, and then click “Open Windows PowerShell.”

在所需位置打开PowerShell窗口的最快方法是首先在“文件资源管理器”中打开文件夹。 在那里,单击文件>打开Windows PowerShell,然后单击“打开Windows PowerShell”。

Click File Open Windows PowerShell Open Windows PowerShell to open Windows PowerShell.

First, let’s look at renaming a single file. For that, you would use the following syntax:

首先,让我们看一下重命名单个文件。 为此,您将使用以下语法:

rename-item  "current_filename.ext" "new_filename.ext"

So, for example, to rename a file from “SampleVideo.mp4” to “My Video.mp4” you would use the following cmdlet:

因此,例如,要将文件从“ SampleVideo.mp4”重命名为“ My Video.mp4”,可以使用以下cmdlet:

Rename-Item "SampleVideo.mp4" "My Video.mp4" Type the cmdlet into the PwoerShell window and press Enter to run the command.

PowerShell isn’t just a shell. It’s a powerful scripting environment you can use to create complex scripts for managing Windows systems much more easily than you could with the Command Prompt. If you want to learn how to use PowerShell cmdlets, we’ve put together a list of the best ones to get you started.

PowerShell不仅仅是一个外壳。 这是一个功能强大的脚本编写环境,可用于创建复杂的脚本,以比使用命令提示符更轻松地管理Windows系统 。 如果您想学习如何使用PowerShell cmdlet,我们将列出一些最佳的 cmdlet 来帮助您入门 。

翻译自: https://www.howtogeek.com/665514/6-ways-to-rename-files-and-folders-in-windows-10/



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3