• Empty Recycle Bin from Command Prompt

    Author
    Topic
    #365348

    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,

    Viewing 0 reply threads
    Author
    Replies
    • #563648

      I came across erb – freeware which may do what you want.

      • #563657

        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

        • #563661

          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?

          • #563682

            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

            • #563686

              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.

            • #563750

              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

            • #563763

              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.

            • #563773

              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

            • #563901

              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.

            • #564007

              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
              cheers

            • #564009

              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!

    Viewing 0 reply threads
    Reply To: Empty Recycle Bin from Command Prompt

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: