I'm looking for quick help on putting a simple powershell script together that will copy files on Server A to Server B. It's a very simple setup; only one directory so no need to use recursion. I want to be able to use an input file and then something like a foreach or foreach-object to step thru each item on the text file and do the copy. Something like the code that I've attached. I realize that since my input file only contains file names and not the absolute path of the file, I need to construct that in or before the copy command. You're help is much appreciate it. I need help with this quick so I'm offering max points...I know it's simple but I'm not a Powershell guy.
$source = 'C:\Folder B'
$dest = 'C:\Folder A'
$data = get-content 'C:\input.txt'
Foreach ($i in $data)
Copy $source $dest