Hey everyone
Hoping to get some guidance on a Powershell script I am trying to create.
Thought I would give some background on what I am trying to accomplish.
Currently I have to manually upload files to 8 different locations. The workflow I am using is to open those locations and paste the file into the folder.
What I am hoping to be able to do is load all the files that need copied to the locations into a container folder and then run the script and have it find the container folder copy those contents and then copy them to all 8 locations.
I have figured out how to get it to copy the contents of the container folder to a single location but cannot seem to get it to more than one. I am ok with having the file paths entered into the script but would really like to have it read them from a text file if that is possible.
This is what I have come up with so far. hopefully its not completely crap.
$folder1 = "C:\users\Thedabler\desktop\project\server 1"
$folder2 = "C:\users\Thedabler\desktop\project\server 2"
$folder3 = "C:\users\Thedabler\desktop\project\server 3"
$folder4 = "C:\users\Thedabler\desktop\project\server 4"
$folder5 = "C:\users\Thedabler\desktop\project\server 5"
$folder6 = "C:\users\Thedabler\desktop\project\server 6"
$folder7 = "C:\users\Thedabler\desktop\project\server 7"
$folder8 = "C:\users\Thedabler\desktop\project\server 8"
$Allfolders = "$folder1","$folder2","$folder3","$folder4","$folder5","$folder6","$folder7","$folder8"
Copy-Item "C:\users\Thedabler\desktop\project\To be Moved\*" -Destination "$Allfolders"