Skip to contentGo to the directory tree
FolderRisk: Caution

Documents C:\Users\<utilisateur>\Documents

User Documents folder: default location for personal documents; can be redirected to OneDrive or a network share.

Updated on By AltF4 Formation

What it’s for

Documents (known folder ID FOLDERID_Documents) is where applications offer to save the user’s documents by default. Together with Desktop and Pictures, it is among the most valuable data in a profile.

What it contains

The documents created by the user and by their applications. Some applications add their own subfolders (games, Office templates, configuration backups). On older versions, legacy Windows XP links such as “My Music” or “My Pictures” remain as junctions with access denied, so leave them alone.

Risks and best practices

  • This folder is the core of the user’s data: keep it out of automatic cleanups and include it in backups.
  • It can be redirected (OneDrive through Known Folder Move, or a folder redirection policy), in which case the files are not necessarily stored on the machine. Query the real path before backing up or migrating.
  • To migrate a profile, move the folder with the “Location” property or through policy, not by copying by hand and renaming.
  • Documents can be confidential, so apply suitable NTFS permissions and encrypt the disks.

Useful commands

Fenêtre de terminal
# Real path of the current user's Documents folder
[Environment]::GetFolderPath('MyDocuments')
# Possible redirection (Registry value)
(Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders').Personal
# Total size in GB
[math]::Round((Get-ChildItem ([Environment]::GetFolderPath('MyDocuments')) -Recurse -File -Force -ErrorAction SilentlyContinue |
Measure-Object Length -Sum).Sum / 1GB, 2)

Report a mistake