locked
Extracting Documents folder contents from multiple profiles in Windows 10 RRS feed

  • Question

  • Does anyone know how to extract all the files from documents folder for all profiles in a windows 10 machine? Rather than going into each profile manually. 

    Maybe a Power Shell script which would create a corresponding folder for each profile and copy the contents of Documents to that folder.

    Thanks

    • Moved by Bill_Stewart Wednesday, May 9, 2018 2:47 PM This is not "scripts on demand"
    Thursday, March 22, 2018 4:02 PM

All replies

  • Google and the gallery would be a good place to start. Be aware that this forum doesn't write scripts. Tell us what you've tried and what errors you are getting.

    The below will get you all the files and folders in all the users documents folders:

    Get-Item C:\Users\*\documents | Get-ChildItem


    Learn PowerShell                     Script Requests

    -Remember to mark the correct response as the answer-

    Thursday, March 22, 2018 4:59 PM
  • This gives me the listings of the Documents folder. How can I get the actual file contents of each profile?
    Thursday, March 22, 2018 5:43 PM
  • What do you mean "the actual file contents"? try using -Recurse on the Get-Childitem to go down the entire file tree for each Document folder.

    Learn PowerShell                     Script Requests

    -Remember to mark the correct response as the answer-

    Friday, March 23, 2018 9:19 AM