Sorry it's probably a dumb question: what is the difference between
Remove-Item -recurse -Force -Verbose
and Remove-Item -Force -Verbose
it seems if we use -recurse
for a folder and subfolders powershell delete file one by one inside the folder. and if we remove the -recurse
powershell simply delete the main folder without checking inside the folder. technically isn't script will run faster without -recurse
?
when you use Remove-Item
on a dir tree that holds files ... and do NOT use -Recurse
, you will get the standard confirmation prompt. so using that parameter makes it run without the delay from the "do you really want to do this?" prompt.
this is one of the reasons that some folks prefer to pipe the output of Get-ChildItem
to Remove-Item
.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments