moonshine149 发表于 2024-6-23 20:11

b神传奇头像使用powershel脚本整理教程

本帖最后由 moonshine149 于 2024-6-23 20:14 编辑

b神的传奇头像包使用后可能出现不匹配的情况,发现规律是每个头像本应匹配的人物id相差1于是我使用了一下powershell代码来处理

$folderPath = "改成你的文件夹路径"
$files = Get-ChildItem -Path $folderPath -Filter "*.png" | Sort-Object { ::GetFileNameWithoutExtension($_.Name) } -Descending
foreach ($file in $files) {
    $number = ::GetFileNameWithoutExtension($file.Name)
    $newNumber = $number + 1
    $newName = "$newNumber.png"
    $newPath = Join-Path -Path $folderPath -ChildPath $newName
    Rename-Item -Path $file.FullName -NewName $newPath
}



更改$folderPath 后直接在powershell内运行即可,可以自动判断文件格式,不需要移除config.xml
更改完后,请重新生成config.xml
如果你不想动手操作,或者出现报错情况,请直接使用以下链接

百度网盘:https://pan.baidu.com/s/1wIQUfdDrvcEebE7MySNSGA?pwd=0000
提取码0000
123云盘:https://www.123pan.com/s/bCADVv-kQ0cv.html
夸克网盘:https://pan.quark.cn/s/3322c4ce3b68on
OneDrive:https://2wxhw1-my.sharepoint.com/:u:/g/personal/x_2wxhw1_onmicrosoft_com/EYltrPb3agpGpewJ0x0YeZsBNDyT2QfATKagRVyzvlJ-aQ?e=0C5uwQ
115生活:https://115.com/s/swzae1x3wxt?password=1111
访问码1111


注:使用前,请保证路径正确,否则可能导致你的重要文件被更改文件名

1128leon 发表于 2024-6-24 08:32

这是24.3吧,有24.4吗?24.4对不上
页: [1]
查看完整版本: b神传奇头像使用powershel脚本整理教程