title: Recursively copy folders with long file names (more than 260 chars)
body: <p>I am trying to automate copy/replication of drives. Many of the drives have long file names, that fail the process midway.</p>
  
  <p>I was using this copy command, but both these fail.</p>
  
  <pre><code>XCOPY /E c:\folder-you-want-to-copy\*.* C:\destinationfolder\ 
  
  copy-item -Path K:\* -Destination E:\ -Recurse -Force
  </code></pre>
  
  <blockquote>
    <p>Copy-Item : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 260 characters.</p>
  </blockquote>
  
  <p>I then tried SO help <a href="https://stackoverflow.com/q/10224545/6085193">power shell from here</a> and <a href="https://stackoverflow.com/a/40453635/6085193">SO help here</a>, but the enable option was missing in Win 10 policy for my machine</p>
  
  <p>How can I recursively copy the files from one drive to another drive with the long file names/path?</p>