在PowerShell中相当于Linux mkdir {fileA,fileB} [英] Equivalent for linux mkdir {fileA,fileB} in PowerShell

查看:201
本文介绍了在PowerShell中相当于Linux mkdir {fileA,fileB}的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是古玩.是否有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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆