If you can’t locate a lost file from your backup, then you can use Windows File Recovery, which is a command line app available from the Microsoft Store. Use this app to try to recover lost files that have been deleted from your local storage device (including internal drives, external drives, and USB devices) and can’t be restored from the Recycle Bin. Recovery on cloud storage and network file shares is not supported.
Note This app requires Windows 10 build 19041 or later (See which version of Windows 10 you have).
Important: If you want to increase your chances of recovering a file, minimize or avoid using your computer. In the Windows file system, the space used by a deleted file is marked as free space, which means the file data can still exist and be recovered. But any use of your computer can create files, which may over-write this free space at any time.
The following information can help you decide which file system you have and which mode to use.
File systems
File system
SD cards, flash or USB drives (< 4GB)
Computers (HDD, SSD), external hard drives, flash or USB drives (> 4GB)
There are several file systems supported by Windows that vary depending on the storage device or operating system. Recovering files from non-NTFS file systems is only supported by extensive mode. To see which file system you have, right click a drive in File Explorer and select Properties.
Deciding which mode to use
Use the following table to help you decide which mode to use. If you are not sure, start with Regular mode.
Deleted a while ago
After formatting a disk
A corrupted disk
Command line syntaxGeneral syntax
The following table summarizes what each advanced switch is used for.
Parameter / switch
Description
Supported mode(s)
Specifies the storage device where the files were lost. Must be different from the destination-drive.
Specifies the storage device and folder on which to put the recovered files. Must be different from the source-drive.
Regular mode, the standard recovery option for non-corrupted NTFS drives
Extensive mode, a thorough recovery option suitable for all file systems
Scans for a specific file by using a file name, file path, file type, or wildcards. For example:
Summary of syntax and switches for general users.
Summary of syntax and switches for advanced users.
Advanced syntax
The following table summarizes what each advanced switch is used for.
Description
Supported modes
NTFS mode, a fast recovery option for healthy NTFS drives using the master file table
Segment mode, recovery option for NTFS drives using file record segments
Signature mode, recovery option for all file system types using file headers
Recover specific extension groups, comma separated
Signature mode extension groups and supported file types.
Saves a log file of the recovery operation in a different location than the default location on the recovery drive (for example, D:\logfile).
Overrides user prompts, which is useful in a script file.
Recovers undeleted files, for example, from the Recycle Bin.
Recovers system files.
Specifies whether to always (a), never (n), orkeep both always(b) when choosing whether to overwrite a file. The default action is to prompt to overwrite.
Recovers files without primary data streams.
To keep your results manageable and focus on user files, some file types are filtered by default, but this switch removes that filter. For a complete list of these file types, see the information after this table.
Specifies which file types are filtered. For a complete list of these file types, see the information after this table.
Specifies the number of sectors on the source device. To find sector information, use fsutil.
Specifies the cluster size (allocation unit) on the source device.
File extension filter list
The following file types are filtered from results by default. Use the /e switch to disable this filter or the /e: filter to specify file types not to filter.
_, adm, admx, appx, appx, ascx, asm, aspx, aux, ax, bin, browser, c, cab, cat cdf-ms, catalogItem, cdxm, cmake, cmd, coffee, config, cp, cpp, cs, cshtm, css, cur, dat, dll, et, evtx, exe, fon, gpd, h, hbakedcurve, htm, htm, ico, id, ildl, ilpdb, iltoc, iltocpdb, in, inf, inf_loc, ini, js, json, lib, lnk, log, man, manifest, map, metadata, mf, mof, msc, msi, mui, mui, mum, mun, nls, npmignore, nupkg, nuspec, obj, p7s, p7x, pak, pckdep, pdb, pf, pkgdef, plist, pnf, pp, pri, props, ps1, ps1xm, psd1, psm1, py, resjson, resw, resx, rl, rs, sha512, snippet, sq, sys, t4, targets, th, tlb, tmSnippet, toc, ts, tt, ttf, vb, vbhtm, vbs, vsdir, vsix, vsixlangpack, vsixmanifest, vstdir, vstemplate, vstman, winmd, xam, xbf, xm, xrm-ms, xs, xsd, ym
Frequently asked questionsCan you give some tips to help me use the correct syntax?
winfr C: E: /regular /n "\Users\\Documents\Quarterly Statement.docx"
What does mean in the command examples?
In the File Explorer address bar, enter C:\users to see a list of potential users on your computer. There may be several users on your computer, including you, the administrator, and the default account. When you see in a file path, it is a placeholder for the current username on your computer.
Why am I getting this message: "Source and Destination cannot refer to the same physical partition?"
The source and destination drive or partition path should not be the same. If you only have one drive, use a USB or external hard drive as your destination path. Don’t create a partition after losing data, because this reduces the chance of a successful recovery.
Why does the recovery operation take so long?
Depending on the size of the disk, it may take some time to recover the file, especially if you are using Extensive mode.
Why are additional files recovered from my operating system drive?
Behind the scenes, Windows is constantly creating and deleting files. By default, Windows File Recovery filters out these files, but some slip through. To prevent this, use the /n as per examples in this article.
What is the $Recycle.Bin folder?
For NTFS and segment modes, you may also see lost files recovered from the Recycle Bin (files either in the recycle bin or that were permanently deleted) with the name $files.xxx and stored in a folder called $RECYCLE.BIN.
What happens if the destination drive is full?
If you see the following message: "Destination disk is full, please free up space before resuming: (R)esume, (S)kip file, or (A)bort," free up drive space on the destination drive, and then choose one of the options.
I was not able to recover the file, now what?
If you used Regular mode, try again in extensive mode if the file type is supported. It's possible that the free space was overwritten, especially on a solid-state drive (SSD). If you need help, contact your administrator.
winfr source-drive: destination-drive: [/switches] |
The source and destination drives must be different. When recovering from the operating system drive (often C: ), use the /n and /y: switches to specify the user files or folder.
Microsoft automatically creates a recovery folder for you called Recovery_ on the destination drive.
There are three modes you can use to recover files: Default, Segment, and Signature.
Default mode examples
Recover a specific file from your C: drive to the recovery folder on an E: drive.
winfr C: E: /n \Users\\Documents\QuarterlyStatement.docx |
winfr C: E: /n \Users\\Pictures\*.JPEG /n \Users\\Pictures\*.PNG |
winfr C: E: /n \Users\\Documents\ |
Don’t forget the backslash (\) at the end of the folder.
Segment mode examples (/r)
Recover PDF and Word files from your C: drive to the recovery folder on an E: drive.
winfr C: E: /r /n *.pdf /n *.docx |
winfr C: E: /r /n *invoice* |
Signature mode examples (/x)
When using signature mode, it's helpful to first see the supported extension groups and corresponding file types.
Recover JPEG (jpg, jpeg, jpe, jif, jfif, jfi) and PNG photos from your C: drive to the recovery folder on an E: drive.
winfr C: E: /x /y:JPEG,PNG |
Recover ZIP files (zip, docx, xlsx, ptpx, and so on) from your C: drive to the recovery folder on an E: drive.
winfr C: E:\RecoveryTest /x /y:ZIP |
Depending on the size of your source drive, this may take a while.
About modes and file systemsThe following information can help you decide which file system you have and which mode to use.
File systems
There are several file systems supported by Windows that vary depending on the storage device or operating system. Recovering files from non-NTFS file systems is only supported in signature mode. To see which file system you have, right click a drive in File Explorer and select Properties.
File system
SD cards, flash or USB drives (< 4GB)
Windows Server and Windows Pro for Workstations
Computers (HDD, SSD), external hard drives, flash or USB drives (> 4GB)
Deciding which mode to use
Use the following table to help you decide which mode to use. If you're not sure, start with the default mode.
File system
Circumstances
Recommended mode
Deleted a while ago
Segment, followed by Signature
After formatting a disk
Segment, followed by Signature
A corrupted disk
Segment, followed by Signature
Recovery file type is supported (see following table)
Signature mode extension groups and file types
The following table summarizes the extension groups and the supported file types for each group when you use the /y: switch
Extension group
jpg, jpeg, jpe, jif, jfif, jfi
mpeg, mp4, mpg, m4a, m4v, m4b, m4r, mov, 3gp, qt
zip, docx, xlsx, pptx, odt, ods, odp, odg, odi, odf, odc, odm, ott, otg, otp, ots, otc, oti, otf, oth
Command line syntaxGeneral syntax
The following table summarizes what each basic command line parameter and switch is used for.
Parameter or switch
Description
Supported modes
Specifies the storage device where the files were lost. Must be different from the destination-drive.
Specifies the storage device and folder on which to put the recovered files. Must be different from the source-drive.
Uses segment mode, which examines File Record Segments (FRS).
Scans for a specific file by using a file name, file path, or wildcards. For example:
Uses signature mode, which examines file types and works on all file systems.
Scans for files with specific file types. Separate multiple entries by using commas. For a list of extension groups and corresponding file types, see the table, "Signature mode extension groups and file types" in the section, "About modes and file systems".
Shows signature mode extension groups and corresponding file types in each group.
Shows a quick summary of syntax and switches for general users.
Shows a quick summary of syntax and switches for advanced users.
Advanced syntax
The following table summarizes what each advanced switch is used for.
Description
Supported modes
Saves a log file of the recovery operation in a different location than the default location on the recovery drive (for example, D:\logfile).
Overrides user prompts, which is useful in a script file.
Recovers undeleted files, for example, from the Recycle Bin.
Recovers system files.
Specifies whether to always (a), never (n), orkeep both always(b) when choosing whether to overwrite a file. The default action is to prompt to overwrite.
Recovers files without primary data streams.
To keep your results manageable and focus on user files, some file types are filtered by default, but this switch removes that filter. For a complete list of these file types, see the information after this table.
Specifies which file types are filtered. For a complete list of these file types, see the information after this table.
Specifies the number of sectors on the source device. To find sector information, use fsutil.
Specifies the cluster size (allocation unit) on the source device.
First sector to scan on the source device.
Frequently asked questionsCan you give some tips to help me use correct syntax?
Here are some suggestions:
What does mean in the command examples?
In the File Explorer address bar, enter C:\users to see a list of potential users on your computer. There may be several users on your computer, including you, the administrator, and the default account. When you see in a file path, it is a placeholder for the current username on your computer.
Why am I getting this message: "Source and Destination cannot refer to the same physical partition?"
The source and destination drive or partition path should not be the same. If you only have one drive, use a USB or external hard drive as your destination path. Don’t create a partition after losing data, because this reduces the chance of a successful recovery.
Why does the recovery operation take so long?
Depending on the size of the disk, it may take some time to recover the file, especially if you are using signature mode.
Why are additional files recovered from my operating system drive?
Behind the scenes, Windows is constantly creating and deleting files. By default, Windows File Recovery filters out these files, but some slip through. To prevent this, use the /n switch in default and segment modes and the /y: switch in signature mode.
What is the $Recycle.Bin folder?
For default and segment modes, you may also see lost files recovered from the Recycle Bin (files either in the recycle bin or that were permanently deleted) with the name $files.xxx and stored in a folder called $RECYCLE.BIN.
What happens if the destination drive is full?
If you see the following message: "Destination disk is full, please free up space before resuming: (R)esume, (S)kip file, or (A)bort", Free up drive space on the destination drive, and then choose one of the options.
I was not able to recover the file, now what?
If you used default or segment mode, try again in signature mode if the file type is supported. It's possible that the free space was over-written, especially on a solid state drive (SSD). If you need help, contact your administrator.