Windows下如何使用PowerShell批量重命名文件

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Get-ChildItem *.txt| Rename-Item -NewName { $_.Name -replace '\.txt','.log' }
Get-ChildItem *.txt| Rename-Item -NewName { $_.Name -replace '\.txt','.log' }
Get-ChildItem *.txt| Rename-Item -NewName { $_.Name -replace '\.txt','.log' }

 

Leave a Reply

Your email address will not be published. Required fields are marked *