The Toolkit › Forums › General › Can't copy folders
Sorry for the basic question but I’m stumped. Everything else is working but I can’t get the script to copy a folder.
Originally I had it doing something more complicated but for now I’m just trying the very basic.
Copy-File -Path “$dirSupportFiles\*.*” -Destination “C:\Apps” -recurse
in my SupportFiles directory I have a folder called “Avaya” and a document called “batman.txt”. Only “batman.txt” gets copied over.
So I ended up abandoning Copy-File and instead just used Copy-Item.
$User = $($CurrentLoggedOnUserSession.Username)
Copy-Item "$dirSupportFiles\*" "C:\Users\$User\Appdata\Roaming" -Recurse
Was doing some searching and found this post. I have the same problems. At the same time the copy to $evnCommonPrograms was dumping to the root of C for some reason as well.
Here’s what I did. The folder name is ‘Home Care Access’ and gets copied to the Public Desktop:
Copy-File -Path "$dirFiles\Desktop Folders\Home Care Access" -Destination $envCommonDesktop -Recurse
You must be logged in to reply to this topic.