回答如何使用txt中给定的名字批量重命名2015年11月9日 来自 Mooser Lee Get-Content .\FileNameMap.txt | foreach { $source,$newName = $_ -split ' ' if(Test-Path $source){ Rename-Item -Path $source -NewName $newName } else{ Write-Host "$source 路径不存在" -ForegroundColor Red }}