Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Remove-Item vs Delete

$
0
0

I want to delete all text  files in a given folder and I think this will do the trick

       Remove-Item "C:\MyTemp\*.txt"

I also noticed that piping Get-ChildItem to get-Members shows the Delete method.

Which one should I use?  (If it is Delete, an example showing how to use the method would be appreciated).

TIA,

edm2


Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>