1. 程式人生 > >“笨辦法學python”學習筆記-在終端powershell中對目錄進行簡單的編輯(一)

“笨辦法學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:指定路徑