I'm attempting to move my AppData\Local folder to a different drive, and then create a junction in the original location on C. I've already copied everything EXCEPT a handful of files in C:\Users<username>\AppData\Local\Microsoft\WindowsApps, including the execution aliases for my Microsoft Store apps and Ubuntu.
I've logged in as a different admin user, and used the following commands to take control of the folder:
takeown /F "%ProgramFiles%\WindowsApps"
takeown /F "%ProgramFiles%\WindowsApps" /r /d y
icacls "%ProgramFiles%\WindowsApps" /grant Administrators:F
icacls "%ProgramFiles%\WindowsApps" /grant Administrators:F /t
I then tried to use xcopy like so:
xcopy "C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\*" "D:\<path_to_AppData\AppData\Local\Microsoft\WindowsApps\" /h /e /r
I'm still getting the error "File creation error - The file cannot be accessed by the system."
How can I either copy these files, or somehow get around having to copy them?