0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

個人用PowerShellまとめ

Last updated at Posted at 2024-05-29

■ヘルプ
help コマンド

■圧縮、展開
Compress-Archive
Expand-Archive

■ファイル削除、コピー
Remove-Item ファイル名
Copy-Item "フルパス" -Destination "ディレクトリパス"

■ファイル名変更
Rename-Item

■検索(ssでユーザー辞書登録)
Select-String

■再帰的に検索(たぶん)
Get-ChildItem -Recurse | Select-String -Pattern ""

■ファイル名取得(gcでユーザー辞書登録)
(Get-ChildItem -Recurse).fullname

■作成
New-Item

例:フォルダ作成
New-Item -Path "C:\Users\person\Documents\develop\js\sample\trunk\jsbook_my"-Name "chap01" -ItemType "directory"
New-Item -Path "C:\Users\person\Documents\develop\js\sample\trunk\jsbook_my"-Name "chap02" -ItemType "directory"
New-Item -Path "C:\Users\person\Documents\develop\js\sample\trunk\jsbook_my"-Name "chap03" -ItemType "directory"
New-Item -Path "C:\Users\person\Documents\develop\js\sample\trunk\jsbook_my"-Name "chap04" -ItemType "directory"
New-Item -Path "C:\Users\person\Documents\develop\js\sample\trunk\jsbook_my"-Name "chap05" -ItemType "directory"
New-Item -Path "C:\Users\person\Documents\develop\js\sample\trunk\jsbook_my"-Name "chap06" -ItemType "directory"
New-Item -Path "C:\Users\person\Documents\develop\js\sample\trunk\jsbook_my"-Name "chap07" -ItemType "directory"
New-Item -Path "C:\Users\person\Documents\develop\js\sample\trunk\jsbook_my"-Name "chap08" -ItemType "directory"
New-Item -Path "C:\Users\person\Documents\develop\js\sample\trunk\jsbook_my"-Name "chap09" -ItemType "directory"
New-Item -Path "C:\Users\person\Documents\develop\js\sample\trunk\jsbook_my"-Name "chap10" -ItemType "directory"
New-Item -Path "C:\Users\person\Documents\develop\js\sample\trunk\jsbook_my"-Name "chap11" -ItemType "directory"

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?