Last active
June 17, 2021 21:56
-
-
Save CNA-Bld/5b475cb46c7d407fa69a528e448972ab to your computer and use it in GitHub Desktop.
CarrotJuicer cleanup for TeamRaceAnalyzer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$files = Get-ChildItem -Include *.msgpack -Name | |
$teamRaces = $files | Where-Object {($_ -match "R.msgpack") -and (Get-Content $_ -Raw | %{($_ -match "race_start_params_array") -and ($_ -match "race_result_array")})} | |
New-Item -Path .\TeamRaces -ItemType directory -Force | |
Copy-Item $teamRaces -Destination .\TeamRaces\ | |
$roomRaces = $files | Where-Object {($_ -match "R.msgpack") -and (Get-Content $_ -Raw | %{($_ -match "room_info") -and ($_ -match "race_horse_data_array")})} | |
New-Item -Path .\RoomRaces -ItemType directory -Force | |
Copy-Item $roomRaces -Destination .\RoomRaces\ | |
New-Item -Path .\Backup -ItemType directory -Force | |
Move-Item $files -Destination .\Backup\ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment