Hi Everyone!
I have a folder containing a lot of files = 85,000kb
Please help me, script with Powershell is delete all file=85,000kb.
Thank!
Hi Everyone!
I have a folder containing a lot of files = 85,000kb
Please help me, script with Powershell is delete all file=85,000kb.
Thank!
Hi everyone!
I have script delete files:
$limit = 30KB
$path = "F:\Test"
Get-ChildItem -Path $path -Recurse -File | Where-Object { $_.Length -gt $limit } | Remove-Item | Out-GridView
Please view script is OK?
Thank!
Why not verify the results of the script yourself????
Get-ChildItem -Path $path -Recurse -File |
Where-Object { $_.Length -gt $limit } |
Select-Object -First 10 |
Remove-Item -WhatIf:$true
Nothing will be deleted and you can check the output to see if it's removing files that aren't what you expect. You can add a -Skip parameter, too (and/or a -Last parameter) to verify a different set of files from the results.
Hi, given that this post has been quiet for a while, this is a quick question and answer. Has your question been solved? If so, please mark it as an answer so that users with the same question can find and get help.
:)
1 Person is following this question.