Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Using Windows File Recovery Tool (WINFR) on Windows 10

May 10, 2023 Windows 10

Using Windows File Recovery Tool (WINFR) on Windows 10

Windows File Recovery (winfr.exe) is a new free Microsoft tool to recover deleted files on different types of media. The tool is available since Windows 10 2004 (May 2020 Update) and works only in the console mode of the command prompt. You can install WINFR on Windows 10 from the Microsoft Store. The tool allows you to scan a file system and find deleted files. Several scan modes are supported (MFT tables, known file type signatures or segment mode). Windows File Recovery supports NTFS, ReFS, FAT, exFAT and can recover deleted files from locally connected devices: USB flash drives, HDDs, SSDs (you have to note some aspects when you try to recover deleted files from a Trim-enabled SSD).

In this article we’ll show you how to use Windows File Recovery in Windows 10 to restore accidentally (or deliberately) deleted files.

Open Microsoft Store (or go to https://www.microsoft.com/en-us/p/windows-file-recovery/9n26s50ln705?rtc=1) and install the Windows File Recovery (you can find it in Utilities & tools -> File managers).

installing windows file recovery tool from microsoft store on windows 10

Open the command prompt or the PowerShell console and run this command:

winfr

winfr.exe command line options

The main Windows File Recovery options are available in the console.

Here is the typical syntax:

winfr source-drive: destination-drive: [/switches]

As with any other tool able to recover deleted files, always restore the found files find to a separate target drive. This prevents accidental overwriting of disk sectors containing deleted file blocks and your chance to recover the information will be higher.

Let’s try to learn how to use Windows File Recovery on Windows 10 based on some examples.

winfr.exe can work in 3 modes:

  • Standard mode uses an MFT table to search deleted files. It is effective if file record segments (FRS) still exist on a disk;
  • Segment mode is used to search different NTFS segments on a disk instead of searching the MFT table. Segments are different file attributes on a disk, like name, size, type, date, etc;
  • Signature mode – the tool searches the disk for signatures of different file types (winfr has several built-in signatures for popular file types). This mode is not suitable to find small files. It is the only mode supporting drives with file systems other than NTFS.

Let’s try to recover a recently deleted file on Windows 10 using the Windows File Recovery.

Suppose, you know an exact name of the deleted file and the directory it was located in. The following command will search deleted files on drive C: using the \PS\test.txt filter and recover the files it finds to a separate drive K: (I removed the file permanently using shift+delete). This command is run in the standard winfr mode, wildcards (*) are allowed (the file path is specified without the disk name, it is supposed you have already specified the source-drive):

winfr C: K: /n \PS\test.txt

The tool scans the disk (Pass 1: Scanning and processing disk) and recovers the files it finds to the specified directory (Pass 2: Recovering files).

In this example, 2 deleted files with the same name appeared in the specified directory. The tool asked what to do with the files it had found:

File K:\Recovery_20210316_105053\PS\test.txt exists: (o)verwrite, (s)kip, (a)lways overwrite, (n)ever overwrite, (k)eep both once, keep (b)oth always

winfr recovering deleted files

After you have made your choice, press Y. A directory with the recovery log and restored files will open automatically.

check recovery log of windows file recovery

If you know only the name of the folder in which the deleted files are stored, use this command:

winfr C: K: /n \PS\

Put a backslash (\) at the end of the folder name.

After scanning for the removed files, all found elements will be recovered to a target folder. The tool will automatically order the files by their names and types.

Recover lost files on Windows 10 using Windows File Recovery

The commands shown above are effective if a file has been deleted recently. If the file was a long time ago, or the source drive was formatted, it is recommended to use a segment mode with /r option (for NTFS drives only).

For example, you want to deeply scan a directory to find files with the specific extensions (Excel files: xls and xlsx). Use this command:

winfr C: P: /r /n \Sales\*.xls /n \Sales\*.xlsx

You can specify a part of a file name:

winfr C: P: /r /n *annual*

A signature mode is used to find deleted files on a disk with a file system other than NTFS. Typically, it is used to search removed files on USB flash drives, SD cards of phones or cameras. The /x option is used to perform a signature scan.

For example, you want to find deleted files on an SD card by JPEG or PNG signatures.

winfr E: K: /x /y:JPG,PNG /n \DCIM\

The table below shows the list of signatures available in Windows File Recovery and file types that belong to each signature.

Signature NameFile Types
ASFwma, wmv, asf
JPEGjpg, jpeg, jpe, jif, jfif, jfi
MP3mp3
MPEGmpeg, mp4, mpg, m4a, m4v, m4b, m4r, mov, 3gp, qt
PDFpdf
PNGpng
ZIPzip, docx, xlsx, pptx, odt, ods, odp, odg, odi, odf, odc, odm, ott, otg, otp, ots, otc, oti, otf, oth

You can get some help on the advanced Windows File Recovery options as follows:

/p:<folder> - Specify recovery log destination (default: destination folder)
/a - Accepts all user prompts
/u - Recover non-deleted files (default/segment mode only)
/k - Recover system files (default/segment mode only)
/o:<a|n|b> - Overwrite (a)lways, (n)ever or keep (b)oth always (default/segment mode only)
/g - Recover files without primary data stream (default: false, default/segment mode only)
/e - Disable extension exclusion list (default/segment mode only)
/e:<extension> - Disable specific extension(s) (default extension list no longer applies) (default/segment mode only)
/s:<sectors> - Number of sectors in volume (segment/signature mode only)
/b:<bytes> - Number of bytes in cluster (segment/signature mode only)
/f:<sector> - First sector to scan (segment/signature mode only)

winfr.exe syntax

The built-in Windows File Recovery is quite a simple and effective tool to find and recover deleted files in Windows 10. If you have accidentally deleted an important file, now you don’t need to look for and install a third-party software (commercial as a rule) to scan your drive. Just install the tool winfr.exe from Windows Store or add it into your deployment Windows 10 image.

2 comments
2
Facebook Twitter Google + Pinterest
previous post
Install and Configure KVM Hypervisor on CentOS/RHEL
next post
Fix: Linux Boots into “Welcome to Emergency”

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

2 comments

Tariq March 18, 2021 - 1:34 pm

Great article! Thanks

Reply
Shlomi March 19, 2021 - 8:38 am

Perfect! thank you so much!

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • Updating List of Trusted Root Certificates in Windows
  • How to Create a Wi-Fi Hotspot on your Windows PC
  • How to Sign an Unsigned Device Driver in Windows
  • How to Download APPX File from Microsoft Store for Offline Installation?
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top