Family Encyclopedia >> Electronics

How to recover deleted files using WINFR command line in Windows 11/10?

Even though it is not that common, file loss happens to many Windows users. The only backup Windows offers is the Recycle Bin, and once removed from there, there's no way to recover deleted files. Besides that, there are many ways for someone to lose a file. It can be due to permanent deletion, accidental deletion of partition while using Disk Management tool, formatting wrong drive, etc. This article will guide you to recover deleted files using WINFR on Windows 11/10.

ContentsWhat is WINFR Tool?How to Recover Deleted Files Using WINFR in Windows 11/10?WINFR Advanced ModeAdvanced OptionsAdvanced SwitchesHow Recovery Tools Work?How Can I Find Deleted Files from Cloud Storage ?Where is my Recycle Bin on the Windows desktop?Can I recover files for a formatted drive?

What is the WINFR tool?

WINFR a command line tool from Microsoft which can recover files such as JPEG, PDF, PNG, MPEG, Office files, MP3 and MP4, ZIP files and more. It supports all storage devices and formats, including HDDs, SSDs, USBs, memory cards, and NTFS, FAT, exFAT, and ReFS file systems. Using this tool, you can search based on file names, keywords, file paths or extensions.

How to recover deleted files using WINFR under Windows 11/10?

Once you install the tool from Microsoft Store, it will be listed as one of the Start menu apps. When you launch it, it will open a command prompt interface to run Winfr related commands. Here is the list of modes and switches it supports:

  • Order: winfr source drive:destination folder [/mode] [/switches]
  • Modes:
    • /regular – Regular (standard recovery option for non-corrupt NTFS drives)
    • /extensive – Extensive (full recovery option suitable for all file systems)
  • Switches:
    • /n – Filter search (wildcards allowed, end \ for folder)
      /? – Help text
      /! – Show advanced features

So, if you want to recover deleted files in D drive, you can use the following command:

winfr D:\FamilyPhtos D:\Recoveryn /regular /n *.jpg

If you are looking for a document such as a PDF file, you can use the following command:

winfr C:\Desktop\Documents D:\Recovery\Documents /extensive /n *.pdf

If you have an NTFS drive that is not corrupted, you can use the standard option. However, if you have a drive you are unsure about, you can always use extended mode, which will go through all filesystem types.

WINFR advanced mode

This tool also comes with an advanced mode that allows for micro-controlling options and filters. Although most users don't need it, if you are developing a tool that provides a user interface, you can build it using this tool. Also, the advanced options can be very handy for logic-based searching.

Advanced options

  • /ntfs – NTFS mode (fast recovery option for healthy NTFS drives using master file table)
  • /segment – ​​Segment mode (recovery option for NTFS drives using file record segments)
  • /signature – Signature mode (recovery option for all filesystem types using file headers)
  • /n – Filter search (NTFS/Segment mode only, wildcards allowed, end \ for folder)
  • /y: – Retrieve specific extension groups (signature mode only, comma separated)
  • /# – Show signature mode extension groups and file types

Advanced Switches

  • /p: – Specify recovery log destination (default:destination folder)
  • /a – Accept all user prompts
  • /u – Recover undeleted files (NTFS/Segment mode only)
  • /k – Recover system files (NTFS/Segment mode only)
  • /o:– Overwrite (a)always, (n)always or keep (b)always (NTFS/Segment mode only)
  • /g – Recover files without main data stream (default:false, NTFS/Segment mode only)
  • /e – Disable extension exclusion list (NTFS/Segment mode only)
  • /e: – Disable specific extensions (default extension list no longer applies) (NTFS/Segment mode only)
  • /s: – Number of sectors in volume (Segment/Signature mode only)
  • /b: – Number of bytes in the cluster (Segment/Signature mode only)
  • /f: – First sector to scan (Segment/Signature mode only)

Overall, it's a great tool as long as you're comfortable with the command line interface. If not, check out the recommended list of free data recovery software.

How do the recovery-tools work?

Any recovery tool works on the same principle, but then the algorithm brings out each of them. Similarly, Winfr looks for deleted files that are not available in the main table but physically available on the drive. Recovery tools search the drive directly instead of searching a master table for its location and list the files.

How do I find deleted files from cloud storage?

Most online storage solutions like OneDrive, Dropbox, and Google Drive offer recycle bins or recycle bins where files stay for 30 days. If you deleted it within the given time, you can recover the files. However, once deleted from there, you will not get it back.

Where is my recycle-bin on the windows desktop?

Windows team moved most of the icons like My Documents, Recycle Bin, My Computer from desktop. If you want quick access to the recycle bing, search for it in the Windows start menu and it will open.

Can I recover files for a formatted drive?

It is possible to some extent. If the drive has not been formatted multiple times and overwritten by something else, then yes, you should be able to recover data from a formatted drive. Most advanced recovery software should be able to do this.