Data Recovery with Windows 10 Undelete Command

This post introduces how to perform Windows 10 undelete command to retrieve data. Besides, several other methods are provided to get back your deleted data.

Hester

By Hester / Updated on October 17, 2024

Share this: instagram reddit

What is undelete command?

 

I accidentally deleted my files on my computer and now I want to recover them. Does anybody know what is the Windows 10 undelete command?”

- Question from a user

undelete files

The Windows undelete command can recover unimpaired/undamaged data from a defective disk by scanning the hard disk sector by sector. With different causes of data deletion, you can use different undelete commands to recover your data. Read on to learn more undelete commands.

How to perform Windows 10 undelete command

In this part, we offer you several methods to undelete files using command in different situations.

Method 1. Retrieve deleted files using recover command

How to perform Windows 10 undelete command? Make sure your files are not corrupted or lost and then follow the next steps to recover deleted files with undelete command.

Step 1. Input “cmd” in the search box and select Run as administrator.

run as administrator

Step 2. Type in diskpart > list disk > select disk 0 > list volume > select volume 1. Please replace the number here with the real drive letter of your affected drive.

Step 3. Run the command recover [drive:][path]filename. Specify the parameters according to your specific file location.

recover command usage

For example, if you want to recover a picture stored in a folder named “photos” on the desktop, you could run the command recover c:\photos\travle01.jpg

Note:
  • Type in the exact filename and path or the command won’t work.
  • It only allows for restoring 1 file at a time.
  • Wildcards like “*” will be invalid and could not be utilized.

Method 2. Recover deleted files using Attrib Command Prompt

How to perform undelete command Windows 7/8/10/11? If you accidentally empty the Recycle Bin, you can also use the Attrib command to find the files.

Step 1. Enter "PowerShell" in the search box, then select "Run as administrator."

run windows powershell

Step 2. Type in the following commands and press Enter one by one.

  • cd\
  • cd $Recycle.bin
  • attrib -r -s -h *.*
  • dir */s

recover recycle bin

Method 3. Recover files using command via Windows File Recovery

You can also use Microsoft software Windows File Recovery to restore your deleted files, but it will be much more difficult for a green hand who may get command error during the session.

To use Windows File Recovery, firstly you have to examine your File system. Right-click the disk where you previously stored your deleted pictures in This PC, and then select Properties.

check file system

Then, based on the file system, you need to choose the appropriate mode.

wfr mode

Choose the switch in the following table to reduce the scanning range.

Switches

Meaning

Supported mode(s)

/n

Filter the scan range: scans for a specific file with its file name/path/type, etc.

All

/y:

Recovers specific extension groups.

Signature

/k

Recovers system files.

NTFS Segment​​​​​

/segment

Segment mode; recovers files under NTFS drives using file record segments.

Segment

/signature

Signature mode; recovers files under all file system types using file headers.

Signature

/u

Recovers undeleted files, for example, from the Recycle Bin.

NTFS Segment

Step 1. Go to Microsoft Store to Get Windows File Recovery.

microsoft store windows file recovery get

Step 2. Launch Windows File Recovery as administrator and then enter the following command:

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

  • source-drive: the drive where you lost your files
  • destination-drive: the target drive you want to restore your recovered files, which can’t be the same as the source drive

For example,  if you want to recover a deleted file named “paper” in D: drive to E: drive. You can input the following command:

winfr D: E: /extensive /n *paper*

winfr extensive filename

Once the scanning procedure is finished, locate the target drive to find a folder titled "Recovery (date and time)".

Recover hidden files using CHKDSK command

If your files are hidden instead of being permanently lost from the computer, you can show the hidden files using CHKDSK command.

Step 1. Open PowerShell and type the following command to launch the CHKDSK program to instruct it to scan the storage device's full surface for faults and bad sectors.

chkdsk #: /r (replace “#” with the letter of your storage device)

type chkdsk

Tips:
  • Choose Y if you are asked to "convert lost chains to files."
  • During the performance session, CHKDSK will lock your device, making it unable to access any files until the procedure is complete.

Step 2. Enter the following command to make hidden, file protection, and system attributes back to normal.

attrib -h -r -s /s /d #:*.* (again, replace “#” with the letter of your storage device)

type attrib

CHKDSK and ATTRIB can help you gain access to lost files that are not deleted. If you found the attrib command not working, it may mean the files are deleted instead of being hidden.

Professional GUI data recovery tool: Recover permanently deleted files from Windows easily

Since performing undelete commands requires certain technical experience, is there an alternative method to recovering them instead of using a command? Sure! Windows data recovery software MyRecover could be the best option for you.

Whatever the reason for your data deletion, MyRecover can safely and swiftly recover all of your deleted information at once in just three easy steps.

Download SoftwareWin 11/10/8/7/Server
Secure Download

Step 1. Install and run the software. Hover the mouse over the drive saved deleted files before, and click Scan.

select location to scan

Step 2. An automatic quick and thorough scan of your partition will be carried out by the application. After that, a list of lost and deleted files will appear. You can conduct a direct file search by entering the file name into the search box in the top right corner.

scanning drive

Step 3. After choosing the files you wish to recover, click Recover x files to get them back.

select deleted images to recover

Conclusion

If you are going to use Windows 10 undelete command to recover your files, type in the exact filename and path carefully to avoid extra errors. If you can’t remember the exact information or your files are corrupted, don’t worry, you can still try other ways. To retrieve your data safely and quickly, we recommend you use MyRecover.

Hester
Hester · Editor
Hester, a great editor, is dedicated to offering effective data recovery solutions for Windows and iOS users.