/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Utilities/Scripts/copyDumps.ps1
35 строк
1 KB
Sanakan8472
Material Refactor [BREAKING CHANGE] (#1516)
12 апр 2025, 14:25
Не верифицирован
12 апр 2025, 14:25
b7eaf26
Код
Авторство
О чём код?
param ( [string]$InputPath, [string]$OutputPath ) # Ensure the output path exists if (!(Test-Path -Path $OutputPath)) { New-Item -ItemType Directory -Path $OutputPath | Out-Null } # Get all .exe files from the input path $exeFiles = Get-ChildItem -Path $InputPath -Filter *.exe -File # Define the default crash dumps location $crashDumpsPath = Join-Path -Path $env:LOCALAPPDATA -ChildPath "CrashDumps" # Check if the crash dumps directory exists if (!(Test-Path -Path $crashDumpsPath)) { Write-Host "Crash dumps directory does not exist: $crashDumpsPath" exit 0 } # Loop through each .exe file and copy matching .dmp files foreach ($exe in $exeFiles) { $exeName = $exe.BaseName $matchingDumps = Get-ChildItem -Path $crashDumpsPath -Filter "$exeName*.dmp" -File foreach ($dump in $matchingDumps) { $destination = Join-Path -Path $OutputPath -ChildPath $dump.Name Copy-Item -Path $dump.FullName -Destination $destination -Force Write-Host "Copied: $($dump.FullName) -> $destination" } } Write-Host "Dump file copy operation completed."