mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-06-16 01:46:38 +02:00
Update replace-in-files.ps1
This commit is contained in:
parent
b910fb9246
commit
1b63f059be
@ -38,7 +38,7 @@ try {
|
|||||||
ReplaceInFile $file $pattern $replacement
|
ReplaceInFile $file $pattern $replacement
|
||||||
}
|
}
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ replaced '$pattern' by '$replacement' in $($fileList.Count) files in $Elapsed sec"
|
"OK, replaced '$pattern' by '$replacement' in $($fileList.Count) files in $Elapsed sec."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user