deleted and important file

I accidently deleted a file in the windows folder that looked like spyware.  I never emptied the recycle bin so i know its there.. are there any dos commands to restore it?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hello pcmagic2004 =)

hmmmm I dont have any Win98 machine to test it right now... but if im not mistaken, win98 stores recycle bin files in a folder called Recycled which can be accessed from C:\ , means C:\Recycled
so if you are sure that the files were not deleted from recycle bin, dont yu think that they should be present in this folder still :-?

And if So, then u can copy that deleted file from there back to its original location to check if it can sort out the problem for u or not..... ??
and BTW i think that this Recycled folder must be hidden folder, so u will be needed to unhide it before u can get access to it, and when u will restore the file, COPY it, dont move it, so that you will still have a file in the recycle bin :)
you shouldnt have to use dos ... just sort by date if it's a fairly current deletion.    ....or by x  ... or by  y ......
.... very short tutorial here     .... as far as I know there are no dos commands to restore a deleted file.
pcmagic2004Author Commented:
okay well i can't get into windows to do the simple fix dxf......i checked the recycle bin and the file isn't coming up in there.. any other suggestions
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

can i ask which file you deleted.... may be we can get it from another system to copy it to your system :-?
Maybe you can extract the file from the installation CD using the Windows 98 Startup floppy disk and the ext command.;en-us;129605
pcmagic2004Author Commented:
the file is
pcmagic2004Author Commented:
after extracting the file, i get a "file creation error".. it just seems so easy because the file is in the recycle bin!
Description of the System File Checker Tool (Sfc.exe);en-us;185836

Start > Run sfc /scannow

From DOS: Go to C:\WINDOWS\SYSTEM and type SFC and choose Check for missing/corrupt files
Have the Windows CD ready.

Might be easier to do a dirty install:

Dirty Install of W98 (WinME)

You might have to install W98 over itself to fix it.  
Run the setup program from the CD or WINDOWS\OPTIONS\CABS or INSTALL folder.
This should save all of your settings and programs.
Also make sure you install to WINDOWS not WINDOWS001 ( or whatever ) when it asks where to install.
paraghsDy General ManagerCommented:
You deleted, thinking it to be a spyware !!! I am sorry to hear that.

Anyway, don't panic.

Boot into DOS mode (that's all you can do at present, no ? :)

Go to root (C:\).
(All files deleted from windows are there in this dir hidden under Windows).

You will find your file here, but it will have a different name. If you have only one .com file under RECYCLED, copy it to your Windows folder with name

Now you should be able to boot into Windows.

Or, you can copy from another W98 PC, and copy it to Windows folder.

See this:

Creating a New File When You Cannot Start Windows

Good luck,

I agree with paraghs in that you should be able to retrieve the file, but there is one thing you may have to do first to allow you to copy the file.  The C:\RECYCLED folder is a System Folder and also Hidden, so it possibly won't allow you to copy the contents out of it.  If you type the following command from the C:\> Prompt:

attrib  recycled

you should see this:

     SH      RECYCLED      C:\RECYCLED

The "S" and "H" mean System and Hidden Attributes respectively, which is what this folder should be.  If you type the command:

attrib -h -s  recycled

it will remove these attributes, and allow you to copy the file out using paragh's command:

copy  c:\recycled\   c:\windows\

Once done, restore the correct attributes to the recycle folder with the reverse procedure:

attrib +h +s  recycled

Power Off, and then power up and see if Windows starts up.

If it won't allow you to copy, then check the attibutes and remove them if it shows hidden or system.

attrib  recycled\

attrib  -h  -r  -s  recycled\
paraghsDy General ManagerCommented:
Hi Bill,

I just checked a Win 98 PC by booting it into DOS mode.
While RECYCLED folder is hidden under windows, it is accessible in DOS without any extra effort.

This is because RECYCLED is a Windows system folder, and Windows protects it, but DOS doesn't.

So, attrib command suggested by you will not be required.
In fact, check and see if DOS shows the file using the following command from the C:\> Prompt:

dir  /ah  recycled

The /ah tells it to list only files with the hidden attribute set, and it lists the contents.

I've just deleted a file (NOT!!, and it wasn't named INFO2 either) to check this.  Here's the command history:

C:\>attrib recycled\info2
  A   H      INFO2         C:\recycled\INFO2

C:\>copy recycled\info2 c:\windows\desktop\test1.txt
File not found - recycled\info2
        0 file(s) copied

C:\>attrib -h recycled\info2

C:\>copy recycled\info2 c:\windows\desktop\recovered.txt
        1 file(s) copied

Opening the recovered file with NotePad, I now remember that it was clock.ini, and this is what notepad shows:

C:\WINDOWS\clock.ini \clock.ini  C:\RECYCLED\DC0.INI

The file wasn't actually moved to the Recycle Bin at all, it stayed in the same place on the hard drive.  The index or directory entry (comprising the complete path and filename of the file) was placed in the Recycled folder.  The file was then renamed, but would no longer be seen on the hard drive because the link to it was broken. The original name and location of the file are stored in the hidden index file, called INFO2 in the Recycled folder.

If you had been able to restore the file in Windows, the original path would have been read from the INFO2 file and the original file would have been renamed back to WIN.COM, and its directory entry restored.

paraghsDy General ManagerCommented:

You must be aware that the concept of Recycle Bin was taken from Macintosh Trash Can.

Although the files deleted by you are not removed from your hard disk, its directory entry is deleted, and a reference to original location is stored in Recycle Bin.

Also, while the directory entry of the original location is deleted, OS must assign a file name for the HD sectors that the deleted file was occupying, so that other data is not written to that space. Hence, it is renamed to a different name.

To delete a file without sending it to Bin, you use Shift+Delete.
PAQed with no points refunded (of 500)

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.