(Windows10)フォルダ内のファイル名の一部を一括変更する方法
目的:ファイル名の命名規則を統一したいけど、いちいち変えていると日が暮れてしまうので一括変更したい
変更したいファイルをまとめて一つのフォルダに入れる
フォルダ内でshift+右クリックでpowershellウィンドウでここを開くを選択
https://scrapbox.io/files/68dd2c7a9879142588cb3822.png
powershell上で
code:powershell
$oldText = '変更したい部分'; $newText = '変更後に入れたいもの'; Get-ChildItem | Where-Object { $_.Name -match $oldText } | Rename-Item -NewName { $_.Name -replace $oldText, $newText }
を実行