The folder C:\Users\<user name>
is called the User Profile Folder in Windows.
You may move this folder elsewhere using this procedure:
Sign out pf the user account in question and sign in to another administrator account
Open a command prompt and enter the command below:
wmic useraccount get name,SID
Make a note of the SID of the user
Open regedit
and go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\SID
Modify the value of the item ProfileImagePath
to the new path
In Windows Explorer, rename the original full path of the user profile folder
to the new name.
If you are using OneDrive, you might need to manually change the
OneDrive folder location. Other applications that already use the old folder
may also malfunction and need a manual adjustment.
This operation is not recommended - only do it if you absolutely have to.
These are not working directories, they are configuration files for the user. I believe that it would cause you more problems than be a solution to move them somewhere else. In any case, I don't think you can change these paths, as they are most likely hard-coded into the application which creates them (the variable %DEFAULTUSERPROFILE% is probably hard-coded into it). – Daniel F – 2019-04-06T15:53:23.690
@DanielF ok, thank you. I just think it's a little bit strange that they are hard-coded in user directory. Such files are usually installed in "Program files" – George Zorikov – 2019-04-06T16:01:54.940
1In "Program Files" they place the files which are used by all users of the system. If you check the contents of
.android
, you will see that there are configuration files and files related to builds which the user has done. If for example.android\avd
causes you problems because it is growing too much, you can use symbolic links to offload that specific folder to another partition. Maybe you could also relocate the.m2
folder this way, but I don't know if this could cause problems when Android Studio upgrades, because it could delete the entire directory and recreate it. – Daniel F – 2019-04-06T16:07:28.573