title: Batch Script to run on each user profile
body: <p>I am trying to run a batch script that will be used to copy a users Microsoft office customization that are saved in their APPDATA directory to their desktop and I am trying to find a way to have my script loop through C:\Users so that it will run on every user profile on a given computer and places these files on their desktop. </p>
  
  <pre><code>IF NOT EXIST "%USERPROFILE%\Desktop\Office365 Prep" mkdir "%USERPROFILE%\Desktop\Office365 Prep"
  mkdir "%USERPROFILE%\Desktop\Office365 Prep\Signatures"
  mkdir "%USERPROFILE%\Desktop\Office365 Prep\Dictonary"
  mkdir "%USERPROFILE%\Desktop\Office365 Prep\Out Of office"
  mkdir "%USERPROFILE%\Desktop\Office365 Prep\Ribbon Customizations"
  mkdir "%USERPROFILE%\Desktop\Office365 Prep\Scripts_Config365"
  
  
  
  robocopy "%APPDATA%\Microsoft\Signatures" "%USERPROFILE%\Desktop\Office365 Prep\Signatures" /e /np /mir /tee /log+:"\\serverName\log.txt"
  robocopy "%APPDATA%\Microsoft\UProof" "%USERPROFILE%\Desktop\Office365 Prep\Dictonary" /e /np /mir /log+:"\\serverName\log.txt"
  robocopy "%USERPROFILE%\AppData\Local\Microsoft\Office" "%USERPROFILE%\Desktop\Office365 Prep\Ribbon Customizations"  *.officeUI /log+:"\\serverName\log.txt"
  
  robocopy "C:\kworking\O365" "%USERPROFILE%\Desktop\Office365 Prep\Scripts_Config365" 
  </code></pre>