Is there any way to empty the recycle bin in NT 4.0 from a command prompt? I know this can be done via API calls, but I would like to be able to empty the bin from a .cmd file.
Thank you,
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Windows » Windows Vista, XP and earlier » Questions: Vista, XP back to 3.1 » Empty Recycle Bin from Command Prompt
Thanks for the response. The only problem is my company does not allow and “unauthorized” software. That’s why I was trying to do it from the nt 4.0 command prompt. I know the recycle bin is a complicated thing but while using the /a switch on the DIR command, I was able to find a directroy called “RECYCLER.” I put a couple of garbage files into the bin and did the following command from the command window:
del c:recycler*.* /s /f /q
Seems the items are gone and my computer still appears to work. I’m not sure if I have accomplished what I wanted or if I’m shooting myself in the foot.
This whole thing started with clearing out temporary files from the NT 4.0 client systems. Once the temp files were deleted, I wanted the .cmd file to take out the garbage too.
I really miss DOS. No virtual folders there. I also wanted to remove the contents of C:winnttemporary Internet Files. But, the more I look into it, the more virtual the “folder” seems to get. I may get brave and run a command like the one I think may be a solution to the recycle bin. I you or anyone may have a solution via command prompt to clean out the temporary internet files from IE 5.0 via a command prompt, please post and share.
I will post anything I can find!
Once again, your input is greatly appreciated!
Cheers,
Dave
Well, it could be as simple as that!
If you have multiple drives and have one setting in the RB for all, I wonder if that would have any adverse effect?
Otherwise, I came across a W98 solution where it was suggested running:
deltree c:recycled
– i.e. delete the whole caboodle. This may depend on a reboot to allow Windows to rebuild the RB.
Just as a matter of interest, if you have the RB open and run the command, do you see it empty?
Rewgarding the IE temp files, do a search in the Internet Explorer forum – I recall several solutions have been posted (look out for MerC’s posts on this – I’m sure he has something at his site.)
Where you planning on running this mid-session, or at start-up/shut-down?
I had the RB open when the command was run and the contents were gone. I think you would have to run it for every drive though. I saw the Deltree command, but it is not supported in NT 4.0.
For a strart, I’ll try and test the cleanup mid session. Ultimately, I’d like to set up a cleanup of all temp files and empty the RC via the scheduler.
I did not find anything in the IE forum. Most likelly because my search string may not have been too educated. I am getting better on searching though. I did look at the MSDN and a couple of NT 4.0 command window posts for clues. I was not aware of all of the switches you can use at the command prompt.
Cheers,
Dave
I looked at a post in the IE forum. Seems like you should be able to go into IE Options-Advanced and check the “Empty TIF folder when browswer is closed.” But our IT folks seem to have the option locked to keep the files. I probably could change that in the registry, but it’s not the right thing to do.
Oh, as for the scheduler, I figured once per week would be pretty good general maintenance.
Interesting idea you have. I take it we can turn of the RB? and then do a delete of all the TIF files? Kind of like selecting all the garbage, holding then pressing thereby bypassing the RB? Hmmm…any hints?
Cheers,
Dave
I’m sorry, just noticed you are on GMT! You already put in your day’s worth! I have yet to do mine…
Yes, in NT I have the option to bypass the RB. I looked through the Registry and cannot see where to toggle the function on and off.
The aim is to have MANY users not have to do this manually. Maybe a scheduler or a start up .cmd file. Many of the MANY have a proven track record of not being able to distinguish between the left and right mouse button. AND those that can cannot be trusted not to run something like del c:winnt*.* /q /f /a.
“Automation” is “indicated” by the situation. An third party add-in is a great solution, but I have to comply with company standards and have only a few tools available.
Have a good day,
Dave
A couple of registry hacks here:
JSI Tip #1358 to prevent storage of TIF’s
and
Winguides to disable the RB.
Depending on how many is MANY, these may not be practical. A batch file running at startup may still be the best solution.
Thank you so much for the VERY useful links. My search engine did not register any hit at those resource sites. Now, I have all the tools I need to implement something which may make a difference in the lives of the working class of my company.
You have been a great resource. I hope there may be something I can do to help someone else at this site.
Dave
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications