copy multiple files using ps script
Hello,
I am trying to use the PS script from your site to copy multiple files from a remove server to a local folder. The original script is copying only 1 file but i need to copy 12 files. I 've changed from 1 to 12 but im receiving Can't get attributes of file. What am i doing wrong?
# Select the most recent file
$latest =
$directoryInfo.Files |
Where-Object { -Not $_.IsDirectory } |
Sort-Object LastWriteTime -Descending |
Select-Object -First 12
Thanks
I am trying to use the PS script from your site to copy multiple files from a remove server to a local folder. The original script is copying only 1 file but i need to copy 12 files. I 've changed from 1 to 12 but im receiving Can't get attributes of file. What am i doing wrong?
# Select the most recent file
$latest =
$directoryInfo.Files |
Where-Object { -Not $_.IsDirectory } |
Sort-Object LastWriteTime -Descending |
Select-Object -First 12
Thanks