I'm trying to write a simple batch script that copies some files from the %userprofile%\Documents
directory.
I'm testing the script on my machine, but after some failures I realized that I moved my user's data to a separate partition. Therefore, %userprofile%\Documents
is empty, and (obviously) nothing is copied.
I already tried other environment variables such as %homedrive%
and %homepath%
, but they still point at the standard C:\...
Is there a way to find out the actual drive used for the user's data?
I'm using Windows 10.
Thanks!
EDIT
As pointed out by Ƭᴇcʜιᴇ007, I didn't move the user's data to another partition, but I just relocated the "main" folders (Documents, Videos, ...) to some corresponding folders on another partition: right-click on (e.g.) Documents, Properties, Path.
How can I find out the path of a Document folder which has been relocated in this way?
$temp = [Environment]::GetFolderPath('MyDocuments')