Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I accidentally deleted all files by using this command:

del /s /q C:\data\*
.

Is there a chance to recover it?

What I have tried:

I try to use cd $Recycle.bin and attrib -r -s -h *.*, but it will state that file is not found.
Posted
Updated 19-Aug-23 10:15am
v2

Quote:
Recover deleted files

I know it is old fashioned, but it looks like you just discovered the reason why serious programmers are keeping loosing their time doing useless backups.
The reason is that: Backups are a wast of time and resources til suddenly the backups become invaluable because someone did a mistake.
Backup - Wikipedia[^]

Ok, it don't help this time, but next time, you will be ready.
 
Share this answer
 
Which version of Windows are you running?

You may be able to recover it by right-clicking the Data folder and clicking on the Previous Versions tab, if it's there. If the tab is not present, you'll have to install an undelete tool to recover the files. The problem with doing that is installing the tool can overwrite the space occupied by the files, making it impossible to recover them.
 
Share this answer
 
Comments
Member 14771626 18-Aug-23 1:01am    
Thanks for the reply. I'm using Windows 11. It has Previous Versions tab there, but inside the box, it state that 'There are no previous versions available', I think it's because I didn't turn on the File History.
Assuming the data hasn't been overwritten, there's a Microsoft app for that:
Recover lost files on Windows 10 - Microsoft Support[^]

(It mentions Windows 10, but it applies to Windows 11 too.)

But to be honest, your question is off-topic for this forum. And given the number of "file recovery tool" spam messages we get, it almost smells like a setup for spam.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900