?
Solved

Empty recycle bin on windows startup

Posted on 2003-03-13
14
Medium Priority
?
2,201 Views
Last Modified: 2012-08-13
I want to empty recycle bin everytime windows(Win98) stars.
can I do it with a script from batch file?
0
Comment
Question by:TearsForFears
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
  • +1
14 Comments
 
LVL 41

Accepted Solution

by:
stevenlewis earned 200 total points
ID: 8132956
sure, put this in your autoexec.bat
deltree c:\recycl~1
mkdir "c:\recycled"
that will do it
or you can create a batch file with those comnmands, and use call
call the batch file
rec.bat and put it in c:
and in the autoexec.bat
call c:\rec.bat
0
 
LVL 22

Expert Comment

by:Christopher McKay
ID: 8132962
certainly.
You could do it through your autoexec.bat file if you wished.

Or, if you want you can create a batch file that is stored in your startup folder in the start menu.
Enter the following into the batch file:

del c:\recycled\*.* /y

This should remove all of the stuff you deleted when you boot.

Hope this helps!

:o)

Bartender_1
0
 

Expert Comment

by:Lord_Lethris
ID: 8133100
why?

Right click on recycle bin, select PROPERTIES, and turn it off.

OR

Set it to enpty on exit (dependent on OS).

simple.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:TearsForFears
ID: 8139336
method of stevenlewis works. But it prompts on startup. So I had to use the /y switch from Bartender 1. But /y switch does not work with del.

Here is what its finally looks like in autoexec-

deltree /y c:\recycled
mkdir "c:\recycled"

Thank you for your help.

0
 
LVL 41

Expert Comment

by:stevenlewis
ID: 8139748
Glad we could help
Steve
Bartender see here
http://www.experts-exchange.com/Operating_Systems/Q_20551372.html
0
 

Expert Comment

by:Lord_Lethris
ID: 8140635
dont understand....... why use a batch file? when you can simply switch off the recycle bin or tell it to empty on windows exit???

Waist of bloody time U lot are.
0
 

Author Comment

by:TearsForFears
ID: 8140666
have to use a batch file coz win98 don't have that option you are saying....
0
 

Expert Comment

by:Lord_Lethris
ID: 8140705
0
 
LVL 41

Expert Comment

by:stevenlewis
ID: 8140730
why install a third party app, when a batch file does the job?
0
 

Author Comment

by:TearsForFears
ID: 8140770
And does the job very well....
0
 

Author Comment

by:TearsForFears
ID: 8140784
And does the job very well....
0
 
LVL 22

Expert Comment

by:Christopher McKay
ID: 8143139
one last thought stevenlewis, is it necessary to replace the system and hidden attributes on the recycled folder once it's been recreated? Or does Win 98 redo the attributes itself?

TearsForFears, if stevenlewis agrees, you may wish to add this to the end of your batch file in order to restore the original system and hidden attributes to this folder.

attrib +s +h "c:\recycled"
0
 
LVL 41

Expert Comment

by:stevenlewis
ID: 8143458
Bartender, that's a good thought. I'm not sure. I do know that the behavior is somewhat controller by the reg
couldn't hurt to try it
0
 

Author Comment

by:TearsForFears
ID: 8144177
Bartender, I thought of setting the hidden and system attributes. Without setting the attributes, it works but shows the recycle bin folder Icon in c:\ as other folder icons. I added

attrib +s +h "c:\recycled"

as you said and now the Icon is shaded but normal folder Icon. Thanks for that.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally Windows/Microsoft Updates will fail to update. We have found a code that will delete all temporary files and re-register all dll's related to Windows/Microsoft Updates! This works 99% of the time to get the updates working again! The…
Many people tend to confuse the function of a virus with the one of adware, this misunderstanding of the basic of what each software is and how it operates causes users and organizations to take the wrong security measures that would protect them ag…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question