Skip to content

Commit

Permalink
Update Other.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
farag2 authored Nov 29, 2024
1 parent 1c2f768 commit fd4cac3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Other.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,7 @@ try
catch [System.ComponentModel.Win32Exception] {}

# Remove string in file by its' number
# Count starts from 1
$Number = 5
Get-Item -Path "D:\1.txt" | ForEach-Object -Process {
(Get-Content -Path $_ -Encoding UTF8) | Where-Object -FilterScript {$_.ReadCount -ne $Number} | Set-Content -Path $_ -Encoding UTF8 -Force
Expand Down

0 comments on commit fd4cac3

Please sign in to comment.