
ren指令重命名文件夹
Windows ren
command is used to rename files and folder. ren
command provides command line renaming in MS DOS or cmd.exe.
Windows ren
命令用于重命名文件和文件夹。 ren
命令在MS DOS或cmd.exe中提供命令行重命名。
重新命名文件 (Rename File)
The most simple usage of ren
command is renaming one file. In this example we will provide the source or original file name and destination or new file name. Original file name is myfile
and new file name is yourfile
.
ren
命令最简单的用法是重命名一个文件。 在此示例中,我们将提供源或原始文件名以及目标或新文件名。 原始文件名为myfile
,新文件名为yourfile
。
> ren myfile yourfile
重命名多个文件 (Rename Multiple Files)
If we have bulk list of files running ren
one by one is very trivial task. ren
re command support renaming multiple files in a single shot. This is generally used to change extension of files.
如果我们有大容量文件列表运行ren
由一个一个非常简单的任务。 ren
re命令支持一次重命名多个文件。 通常用于更改文件扩展名。
In this example we will rename all *.bak
extensions to the *.txt
files.
在此示例中,我们将所有*.bak
扩展名重命名为*.txt
文件。
> ren *.bak *.txt
重命名目录 (Rename Directory)
As well as directories can be renamed with ren
command. This is the same as renaming file. In this example we will rename file named test
into mytest
.
目录也可以使用ren
命令重命名。 这与重命名文件相同。 在此示例中,我们将名为test
文件重命名为mytest
。
>ren test mytest
使用引号 (Using Quotes)
While working with different files and folders names we should take attention the names with spaces. Space is interpreter differently in MS DOS. So to make ren
command operations more safely we can surround files and directory names with "
double quotes.
在使用不同的文件和文件夹名称时,我们应注意带空格的名称。 在MS DOS中,空间的解释器有所不同。 因此,为了使ren
命令操作更安全,我们可以围绕文件和目录名与"
双引号。
> ren "My File" "Your File"
翻译自: https://www.poftut.com/windows-ren-command-tutorial-examples-rename-files-folders/
ren指令重命名文件夹