Open in the explorer

Display confirmation dialog when deleting files

Afficher la boîte de dialogue de confirmation lors de la suppression des fichiers

Type
User
GPO path
User Configuration › Policies › Administrative Templates › Windows Components › File Explorer FR: Configuration utilisateur › Stratégies › Modèles d'administration › Composants Windows › Explorateur de fichiers
Supported on
At least Windows Server 2003 operating systems or Windows XP Professional FR: Au minimum Windows Server 2003 ou Windows XP Professionnel
ADMX file
WindowsExplorer.admx
Internal name
WindowsExplorer/ConfirmFileDelete

Explanation

Allows you to have File Explorer display a confirmation dialog whenever a file is deleted or moved to the Recycle Bin.

If you enable this setting, a confirmation dialog is displayed when a file is deleted or moved to the Recycle Bin by the user.

If you disable or do not configure this setting, the default behavior of not displaying a confirmation dialog occurs.

French text from Windows 11 26H2

Permet de faire en sorte que l’Explorateur de fichiers affiche une boîte de dialogue de confirmation chaque fois qu’un fichier est supprimé ou déplacé vers la Corbeille.

Si vous activez ce paramètre, une boîte de dialogue de confirmation s’affichera dès que l’utilisateur supprimera ou déplacera un fichier vers la Corbeille.

Si vous désactivez ce paramètre ou si vous ne le configurez pas, le comportement par défaut qui consiste à ne pas afficher de boîte de dialogue de confirmation se produira.

Registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Value name
ConfirmFileDelete
StateValue written
Enablednot defined in the ADMX
Disablednot defined in the ADMX

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: WindowsExplorer/ConfirmFileDelete
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'ConfirmFileDelete' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)

Disable

# Disable: WindowsExplorer/ConfirmFileDelete
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'ConfirmFileDelete' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": WindowsExplorer/ConfirmFileDelete
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
Remove-ItemProperty -Path $k -Name 'ConfirmFileDelete' -ErrorAction SilentlyContinue

Availability