%USERPROFILE% is a built-in Windows environment variable that points to the current user's profile directory.
Example:
C:\Users\john.doe
| Folder Path | Purpose |
|---|---|
%USERPROFILE%\Desktop |
Userβs desktop files |
%USERPROFILE%\Documents |
Userβs documents |
%USERPROFILE%\Downloads |
Downloaded files |
%USERPROFILE%\Pictures |
Personal pictures |
%USERPROFILE%\Music |
Music files |
%USERPROFILE%\AppData |
Hidden folder for app configuration |
cd %USERPROFILE%\Documents
copy file.txt %USERPROFILE%\Desktop\
echo %USERPROFILE%
cd "$env:USERPROFILE\Documents"
Move-Item "$env:USERPROFILE\Downloads\file.zip" "$env:USERPROFILE\Desktop"
| Path | Description |
|---|---|
%USERPROFILE%\AppData\Roaming |
Roaming data (syncs across domain PCs) |
%USERPROFILE%\AppData\Local |
Local-only data (machine specific) |
%USERPROFILE%\AppData\LocalLow |
Low integrity data (e.g., IE, sandboxed apps) |
π AppData is hidden by default.
π§ To view: File Explorer β View β Hidden Items
β Use %USERPROFILE% in scripts to ensure portability
π Redirect or back up important folders before user migration
β Avoid saving large data in %USERPROFILE%\AppData\Local
π§Ό Clean %USERPROFILE%\Downloads periodically
Environment Variables β %TEMP%, %HOMEPATH%, %APPDATA%
Folder Redirection β Store documents on a server or drive
Roaming Profiles β Share user profiles across domain machines
AppData vs ProgramData β User-specific vs system-wide app data