Results 1 to 12 of 12
  1. #1
    Lounger
    Join Date
    Oct 2001
    Location
    Upper NY State, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Empty Recycle Bin from Command Prompt

    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,

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Empty Recycle Bin from Command Prompt

    I came across <A target="_blank" HREF=http://hjem.get2net.dk/fec/software/erb/>erb</A> - freeware which may do what you want.

  4. #3
    Lounger
    Join Date
    Oct 2001
    Location
    Upper NY State, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 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

  5. #4
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Empty Recycle Bin from Command Prompt

    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?

  6. #5
    Lounger
    Join Date
    Oct 2001
    Location
    Upper NY State, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Empty Recycle Bin from Command Prompt

    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

  7. #6
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Empty Recycle Bin from Command Prompt

    Again, just as a matter of interest, how often where you going to run the scheduler?
    I would have thought you could disable the RB and set IE temp files to zero and lock them down with a reg setting.

  8. #7
    Lounger
    Join Date
    Oct 2001
    Location
    Upper NY State, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Empty Recycle Bin from Command Prompt

    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 <shift> then pressing <delete> thereby bypassing the RB? Hmmm...any hints?

    Cheers,

    Dave

  9. #8
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Empty Recycle Bin from Command Prompt

    I'm at home now, only on W2K but:
    Right_mouse the RB on the desktop > properties, do you have a selectable option to not use it?

    Is your aim to force others to do what you want, or are you simply looking to make things the way you want for yourself.

  10. #9
    Lounger
    Join Date
    Oct 2001
    Location
    Upper NY State, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Empty Recycle Bin from Command Prompt

    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

  11. #10
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Empty Recycle Bin from Command Prompt

    A couple of registry hacks here:
    <A target="_blank" HREF=http://www.jsiinc.com/subc/tip1300/rh1358.htm>JSI Tip #1358</A> to prevent storage of TIF's
    and
    <A target="_blank" HREF=http://www.winguides.com/registry/display.php/943/>Winguides</A> 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.

  12. #11
    Lounger
    Join Date
    Oct 2001
    Location
    Upper NY State, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Empty Recycle Bin from Command Prompt

    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
    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  13. #12
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Empty Recycle Bin from Command Prompt

    Glad to be of help.
    I too found a normal search (Google etc.) was pretty pointless - I just got lucky knowing a few resource sites to search as well!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •