Function (snippet): function copyOnlyFiles{ param( [Parameter(Mandatory=$true)][string]$sourceFolder, [Parameter(Mandatory=$true)][string]$destinationFolder ) $totalSizeBytes=0; # Get-ChildItem "C:\Temp"|?{!$_.PSIsContainer}|%{robocopy "C:\Temp" "C:\TempCopy" $_}…