This post mainly answers the question “Can I use the attrib command to recover deleted files?”. Unfortunately, the answer is NO! Don’t worry, four other options are offered to help get back your deleted files.
Many of you may wonder, can I use the attrib command to recover deleted files? Unfortunately, the answer is NO! The attrib command only enables you to recover hidden files. A file might be hidden due to many reasons like system errors, virus attacks, or human causes. If your files disappeared somehow, you could use the attrib command to check whether the file is hidden by unintentional operation or virus infection. For other file loss cases, such as formatting, partition turning RAW, or files being deleted, the attrib command won’t work.
In this part, we won’t introduce how to recover deleted files using the attrib command as this has been clearly clarified as impossible. Instead, we are going to introduce how to recover hidden files using the attrib command.
Step 1. Plugin your hard drive, memory card, or USB drive into your computer.
Step 2. Open the Windows search box and search for cmd. Locate Command Prompt and choose Run as administrator.
Step 3. Type in “attrib -h -r -s /s /d drive letter:\*.*”, for example, “attrib -h -r -s /s /d G:\*.*”.
(Replace G with the drive letter of your hard drive or external storage device where you lost files.)
Step 4. This process will finish after the command prompt returns back the original location. Then you can go to the destination place to check these files. If the attrib command is not working, it may be because is not a hidden document, but a deleted file.
How can deleted files be recovered when the attrib command is not working? In this section, we'll go over how to recover permanently deleted files using CMD. Specifically, the tool Windows File Recovery will be used.
✍Notes: Windows File Recovery’s outcomes are unpredictable and the tool is only compatible with Windows 10 versions 2004 and up.
Preparation work before using Windows File Recovery:
To use this tool, check out your File System first. Go to This PC > right-click on the external drive that contains the deleted files > click Properties.
In addition, you need to use recovery mode and switches to get back your files. To decide which mode to use, refer to this table.
File system | Scenarios | Mode |
NTFS | Deleted recently | Regular |
NTFS | Deleted for a while | Extensive |
NTFS | Formatted disk | Extensive |
NTFS | Corrupted disk | Extensive |
FAT and exFAT | Any | Extensive |
Switches are used to filter the scanning range, thus can save the scanning time.
Switches | Meaning | Supported mode(s) |
/n | Filter the scan range: scans for a specific file with its file name/path/type, etc. | All |
/y: | Recover specific extension groups. | Signature |
/k | Recovers system files. | NTFSSegment |
/u | Recovers undeleted files, for example, from the Recycle Bin. | NTFSSegment |
Step 1. Download and install Window File Recovery on your computer from Microsoft Store and then open it.
Step 2. Open Powershell or Command Prompt (run as administrator). In the Command Prompt, enter commands in the following command format:
winfr source-drive: destination-drive: [/mode] [/switches]
For example, if you need to recover deleted pdf files from F: drive (the external hard drive) to D: drive, then the command will be like:
winfr F: D: /regular /n *.pdf
When the attrib command is not helpful, there are actually a number of simpler alternatives to Windows File Recovery for recovering deleted files. Here we offer you four options to recover deleted files.
The first option is to recover deleted files from Recycle Bin.
Step 1. Double-click Recycle Bin on your desktop to open it.
Step 2. Look for the files that you deleted. Right-click it and choose Restore. Your files will then be restored to the location where they were before they were deleted.
The second option to recover data with backup is to use the Backup and Restore utility provided by Microsoft. But you need to make sure that you have enabled this service in advance.
Step 1. Navigate here: Control Panel > System and Security > Backup and Restore (Windows 7). Click on Restore my files to selectively recover permanently deleted files. You can also choose Restore all users’ files to get all deleted files back.
Step 2. Search for your PowerPoint files by using the Browse for files or Browse for folders option.
Step 3. Choose a location to save the backup, select your files and click Restore to recover them.
If you have turned on File History to save copies of your files, then you can get them back if they are lost/deleted/damaged.
Step 1. Input Control Panel in the Windows search bar, and start it.
Step 2. Click System and Security.
Step 3. Click File History.
Step 4. Click Restore personal files.
Step 5. Select the files you need to recover and then click the Restore button.
The final option to retrieve permanently deleted files is to use professional data recovery software, such as MyRecover.
Download, install and launch MyRecover on your computer.
Step 1. Hover the mouse over the drive and click Scan to scan.
Step 2. Then the scanning process will start automatically. You don’t need to wait for the process to complete if you find the PowerPoint files you want to recover.
Step 3. Choose the PowerPoint files that you want to recover. Click Recover xx files and choose a destination path to save the restored PowerPoint files.
This post has clearly clarified that it is not possible to use the attrib command to recover deleted files. Instead, you are only able to use it to recover hidden files.
If you have accidentally deleted some important files, don’t worry even if you can’t recover them using the attrib command. Five options are presented to you in this post. You can make a decision based on your personal preferences.