[Solved] Using Powershell to copy file from network drive to local drive
Your example is almost complete on its own. You can further your pipeline: $UNC = ‘\\share’ $Path=”C:\Temp” Get-ChildItem -Path $UNC | Where-Object { $_.LastWriteTime -lt (Get-Date) } | ForEach-Object { Copy-Item -Path $_.FullName -Destination $Path } Although, an improvement: $Path=”C:\Temp” $UNC = Get-ChildItem -Path ‘\\share’ -File $Local = Get-ChildItem -Path $Path -File ForEach ($File in … Read more