Guest User

Northgard conquest mission load checker

a guest
Sep 24th, 2023
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 0.73 KB | Source Code | 0 0
  1. # Define the path to the save files
  2. $directory = "C:\Program Files (x86)\Steam\steamapps\common\Northgard\save\conquest"
  3.  
  4. # Define the phrases you're looking for
  5. $phrases = "LandsAfterMorrow", "Invasion", "MedicR", "Cursed"
  6.  
  7. # Get all .sav files in the directory
  8. $files = Get-ChildItem -Path $directory -Filter *.sav
  9.  
  10. # Loop through each file and check if it contains all of the phrases
  11. foreach ($file in $files) {
  12.     $content = Get-Content -Path $file.FullName
  13.    
  14.     $allPhrasesFound = $true
  15.     foreach ($phrase in $phrases) {
  16.         if (-not ($content -like "*$phrase*")) {
  17.             $allPhrasesFound = $false
  18.             break
  19.         }
  20.     }
  21.  
  22.     if ($allPhrasesFound) {
  23.         Write-Output $file.Name
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment