I've tried a few different ways and still the same results it don't work.
remove-item .\*\appdata\local\temp\* -Include *.ica
I want it to remove all the .ica files in the users temp folder.
Looks like you're looking for the users' temp folder. If you're looking for that you can find it with $path = $env:temp
Use that for the $path that @kekimian used.
The finished product would look something like this:
$path = $env:temp
Get-ChildItem -path $path -Filter "*.ica" -Force -Recurse | Remove-Item -Force -Confirm:$False
Try this:
$path = path to the folder
Get-ChildItem -path -Filter "*.ica" | where { ! $_.PSIsContainer } | Remove-Item -Force -Confirm:$true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With