查看: 896|回复: 1

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

[复制链接]
发表于 2024-6-23 20:11 | 显示全部楼层 |阅读模式
本帖最后由 moonshine149 于 2024-6-23 20:14 编辑

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

$folderPath = "改成你的文件夹路径"
$files = Get-ChildItem -Path $folderPath -Filter "*.png" | Sort-Object { [int][System.IO.Path]::GetFileNameWithoutExtension($_.Name) } -Descending
foreach ($file in $files) {
    $number = [int][System.IO.Path]::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


注:使用前,请保证路径正确,否则可能导致你的重要文件被更改文件名
发表于 2024-6-24 08:32 | 显示全部楼层
这是24.3吧,有24.4吗?24.4对不上
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|Archiver|爆棚小组 PlayGM论坛

GMT+8, 2024-10-18 12:52 , Processed in 0.035421 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表