I have a simple ForEach loop
<code>ForEach ($line in Get-Content documents.txt) {
... code ...
}
</code>
<code>ForEach ($line in Get-Content documents.txt) {
... code ...
}
</code>
ForEach ($line in Get-Content documents.txt) {
... code ...
}
and I would like to remove that line from the original file once my code has been processed.
What would be the best approach to achieve this?
Thanks in advance.