更新时间:2023-02-14 21:06:01
这将重命名文件,并在文件夹名和文件名之间添加下划线('_'):
This will rename the files and put an underscore ('_') between the folder name and the file name:
Get-ChildItem C:\temp -Filter *.txt -Recurse | Rename-Item -NewName { $_.Directory.Name+'_'+$_.Name}