PowerShell New-Item 新建文件和文件夹#yyds干货盘点#

网友投稿 1055 2022-09-17

PowerShell New-Item 新建文件和文件夹#yyds干货盘点#

PowerShell New-Item 新建文件和文件夹#yyds干货盘点#

环境配置说明

Windows 21H1 PSVersion 5.1.19041.1320

示例

默认创建文件

PS D:\> New-Item newItem 目录: D:\ Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 2021/11/12 21:31 0 newItem

指定ItemType,新建文件夹

PS D:\> New-Item newDir -ItemType Directory 目录: D:\ Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 2021/11/12 21:26 newDir

ItemType 参数解析

-ItemType Specifies the provider-specified type of the new item. The available values of this parameter depend on the current provider you are using. If your location is in a `FileSystem` drive, the following values are allowed: - File - Directory - SymbolicLink - Junction - HardLink When you create a file using this method, the resulting file is encoded as UTF-8 without a byte-order-mark (BOM). In a `Certificate` drive, these are the values you can specify: - Certificate Provider - Certificate - Store - StoreLocation For more information see about_Providers (../Microsoft.PowerShell.Core/About/about_Providers.md). 是否必需? False 位置? named 默认值 None 是否接受管道输入? True (ByPropertyName) 是否接受通配符? False

学习资料

PowerShell 版本 + 工具 PowerShell/PowerShell 51CTO社区

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:scrapy运行定量爬虫(scrapy爬虫案例python)
下一篇:PowerShell Get-Alias 查看系统预先定义的所有别名#yyds干货盘点#
相关文章

 发表评论

暂时没有评论,来抢沙发吧~