Hi!
It´s my first post and I begin with a dummie issue! :)
I'm using powershell to copy/move files.
Every minute I received files on SOURCE folder. I have to complete two goals: copy source files to destination1 and move source files to destination2.
This is my code:
$listoffiles = Get-ChildItem d:\source\*.*
copy-Item -Path $listoffiles -destination d:\destination1\
move-Item -Path $listoffiles -destination d:\destination2\ -force
Questions:
- Is it the best pratice?
- Is it the best way?
I saw that sometimes the performance of move is low (when I'm with more than 2k files in source folder). I'm worry about the $listoffiles character limit.
Thank's, hugs for all and sorry by bad english!
Rafael França
Brazil