Windows10 Powershell批量更改后缀名


操作系统:Windows10 1809

使用工具:Powershell

命令

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

范例

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>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM