Open in the explorer

Do not move deleted files to the Recycle Bin

Ne pas déplacer les fichiers supprimés vers la Corbeille

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/NoRecycleFiles

Explanation

When a file or folder is deleted in File Explorer, a copy of the file or folder is placed in the Recycle Bin. Using this setting, you can change this behavior.

If you enable this setting, files and folders that are deleted using File Explorer will not be placed in the Recycle Bin and will therefore be permanently deleted.

If you disable or do not configure this setting, files and folders deleted using File Explorer will be placed in the Recycle Bin.

French text from Windows 11 26H2

Lorsqu’un fichier ou un dossier est supprimé dans l’Explorateur de fichiers, une copie du fichier ou du dossier est placée dans la corbeille. En utilisant ce paramètre, vous pouvez modifier ce comportement.

Si vous activez ce paramètre, les fichiers et dossiers supprimés à l’aide de l’Explorateur de fichiers ne seront pas placés dans la corbeille et seront donc définitivement supprimés.

Si vous désactivez ou ne configurez pas ce paramètre, les fichiers et dossiers supprimés à l’aide de l’Explorateur de fichiers seront placés dans la corbeille.

Registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Value name
NoRecycleFiles
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/NoRecycleFiles
$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 'NoRecycleFiles' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)

Disable

# Disable: WindowsExplorer/NoRecycleFiles
$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 'NoRecycleFiles' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

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

Availability