在PowerShell中相当于Linux mkdir {fileA,fileB} [英] Equivalent for linux mkdir {fileA,fileB} in PowerShell
问题描述
我只是古玩.是否有PowerShell的等效项,其行为与标题中列出的liunx命令相同,即
I'm just curios. Is there an equivalent for PowerShell that behaves equally to the liunx command listed in the title, i.e.
mkdir {folderA, folderB}
?
-编辑
上面列出的命令在当前工作目录中创建文件夹"folderA"和"folderB"(刚刚看到我以前写过文件.对不起,我的错).
the command listed above creates the folders "folderA" and "folderB" (just saw that I wrote file previously. Sorry, my fault) in the current working directory.
推荐答案
PowerShell中的mkdir
命令是New-Item
命令的包装.如果要使用单个命令创建多个文件夹,请运行:
The mkdir
command in PowerShell is a wrapper for the New-Item
command. If you want to create multiple folders with a single command, then run:
mkdir c:\test,c:\test2;
有效地,由于PowerShell中的位置参数,这会将数组c:\test,c:\test2
传递给New-Item
命令的-Path
参数.
Effectively, because of positional parameters in PowerShell, this passes the array c:\test,c:\test2
to the -Path
parameter of the New-Item
command.
这篇关于在PowerShell中相当于Linux mkdir {fileA,fileB}的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!