clear file explorer history using command

Clear File Explorer History using Command in Windows 11

If you are concerned about your privacy while using File Explorer on Windows 11, Do you want to clear your File Explorer history to ensure that your recently accessed files are not visible to others? In this article, we will guide you on how to clear the File Explorer history in Windows 11 using different methods. By following these methods you can maintain your privacy and keep your recently accessed files confidential.

Why Clear File Explorer History?

File Explorer in Windows 11 keeps a record of your recently accessed files and folders. This feature is useful as it allows you to quickly access your recently used files. However, there might be situations where you don’t want others to see the files you have recently opened. Clearing your File Explorer history is essential to ensure your privacy and maintain confidentiality. Also Clearing your File Explorer history improves the File Explorer performance.

File Explorer history consists of following items:

Methods to Clear File Explorer History in Windows 11

You can use the following methods, to clear the File Explorer History in Windows 11.

Method 1: using Folder Options

Open the File Explorer by clicking on the folder icon on the taskbar or by pressing the Windows key + E.

Click on the three dots icon at the top of the File Explorer window and open File Explorer menu and Choose “Options”.

Under Folder Options click on the “General” tab, Under Privacy Section, you can see the “Clear File Explorer history” option, click on “Clear” to Clear your File Explorer history.

Folder Option clear quick access history

Once cleared, click on “Apply” and then “OK” to save the changes.

Method 2: Clear only Run and File Explorer address bar History

Open the File Explorer by clicking on the folder icon on the taskbar or by pressing the Windows key + E.

Right-click on the File Explorer address bar, and choose “Delete” history from the context menu, don’t left-click on the address bar, this will edit the address bar, and right-clicking now will open Edit context menu with (Cut, Copy and Paste).

Clear File Explorer History

Note: This method will not clear folders Pinned to Quick Access in File Explorer home. Also, it will not clear Favorites and OneDrive items.

Method 3: Clear File Explorer History using Batch file

Open the Notepad text editor and copy-paste the following code and save it as Clear_File_Explorer_History.bat on your Desktop.

@echo off
set "explorerRecent=%APPDATA%\Microsoft\Windows\Recent"
set "autoDestinations=%APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations"
set "customDestinations=%APPDATA%\Microsoft\Windows\Recent\CustomDestinations"

:: Clear history in File Explorer Home
Del /F /Q "%explorerRecent%\*"
Del /F /Q "%autoDestinations%\*"
Del /F /Q "%customDestinations%\*"

:: Clear typed history in Run dialog and File Explorer address bar
for %%key in ("RunMRU", "TypedPaths") do (
    reg query "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\%%key" >nul 2>&1 && (
        reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\%%key" /F >nul 2>&1
    )
)

echo Complete

Once you run this batch file, you’ll see a command prompt flashes quickly, this will delete all your Explorer history.

Clearing your File Explorer history in Windows 11 is a simple yet effective way to maintain your privacy and keep your recently accessed files confidential. By following the step-by-step guide provided in this article, you can easily clear the Explorer history and enhance your privacy.

Read Also:

Fix File Explorer Stops Responding and Crashes in Windows 11

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top