mirror of
https://github.com/Catfriend1/syncthing-android.git
synced 2025-09-11 21:43:23 +08:00
18 lines
533 B
PowerShell
18 lines
533 B
PowerShell
#
|
|
while ($true) {
|
|
$stringToDelete = Read-Host "Please enter string to remove containing rows in xml files"
|
|
$basePath = ($PSScriptRoot + "\..\app\src\main\res")
|
|
#
|
|
Get-ChildItem -Path $basePath -Recurse -Filter strings.xml | ForEach-Object {
|
|
$file = $_.FullName
|
|
$lines = Get-Content $file
|
|
$filteredLines = $lines | Where-Object { $_ -notmatch [regex]::Escape($stringToDelete) }
|
|
if ($lines.Count -ne $filteredLines.Count) {
|
|
Set-Content -Path $file -Value $filteredLines
|
|
Write-Host "Processed: $file"
|
|
}
|
|
}
|
|
}
|
|
#
|
|
Exit 0
|