删除某目录下文件的扩展名 1


cd D:\compile\publish-beta\server_erp

foreach($file in Get-ChildItem -Path D:\compile\publish-beta\server_erp -Filter *.deploy)
  {
       if($File.Name -notcontains "zh-Hant") {
       $b = $File.Name -replace ".deploy",""
       Rename-Item $File.Name $b
} 
}
本文链接: https://www.pstips.net/remove-extensions-of-file.html
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!

回复 Mooser Lee 取消回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

一条评论 “删除某目录下文件的扩展名