Windows10 Powershell批量更改後綴名

操做系統:Windows10 1809html

使用工具:Powershellshell

命令工具

1 (dir '文件目錄\*.原後綴名')|rename-item -newname { $_.name -replace '\.原後綴名','.要更改後綴名' } 

範例spa

1 (dir 'D:\My Documents\works\Downloads\powershell\*.txt')|rename-item -newname { $_.name -replace '\.txt','.log' } 

 

來自 <https://zhidao.baidu.com/question/384260033.html?qbl=relate_question_0&word=powershell%20%D0%DE%B8%C4%CE%C4%BC%FE%BA%F3%D7%BA>操作系統

相關文章
相關標籤/搜索