“笨办法学python”学习笔记-在终端powershell中对目录进行简单的编辑(一)

1.new-item -path c:/ -name 新建文件夹或文件的名字 -type directory
意思是在C盘新建一个文件夹
成功会这样
new-item: 新建项目
-path:指定路径
-name:文件或文件夹的名字
-type directory:类型目录,也就是文件夹,在这里需要新建什么类型的文件就在这里更改类型
如果不加上-type directory,即
new-item -path c:/ -name 新建文件夹或文件的名字
则会出现因为没有告诉计算机要新建什么,所以新建了一个没有扩展名的文件
2.Remove-item -path C:/文件夹或文件的名字
Remove-item:删除项目
-path:指定路径

猜你喜欢

转载自blog.csdn.net/c1014yzh/article/details/50761293