There you go Dir.exe is 3.79x faster than Get-ChildItem on my notebook with SSD. Measure-Command | Select TotalMilliseconds So how fast are these commands actually? Which command should we use? Let’s use Measure-Command to find out: ![]() /NFL /NDL : No file and No directory listing./BYTES : Display output in bytes (not supported on pre Win7 RoboCopy versions).I’ll list to RoboCopy parameters for reference This deviation seems to be the result of a growing VHD file in my homefolder. On the right-hand-side you will find a screenshot showing the properties of my homefolder. sum #Good old Dir, recursively (( cmd / c dir $home / -C / S / A:-D-L ) -split '\s ' ) #RoboCopy in list only mode: ( robocopy. #Use erroraction silentlycontinue to ignore access denied errors (` Get-ChildItem ` $home -Recurse -force -erroraction Silentl圜ontinue | Measure-Object length -Sum ).
0 Comments
Leave a Reply. |