I need to copy multiple folders to a new location. only select folders need to be copied in the source directory which can be supplied via a file, but I am having trouble figuring out how to use emcopy or robocopy within PS to do this. I have tried many combinations and have not found something which will work. Since I have several hundred folders to move, it would be nice to do this via script.
get-content c:\tmp\file.txt | invoke-command “./emcopy” (dest directory) (switches)
I was thinking something like this, but cannot find the correct combination. I am a low to average PS scripter, so please take it easy on me…Any help is much appreciated.
I have also tried to use 'copy-item, which does work well, but it is way too slow.