Window 10 fails to delete the content of the recycle bin with the cmd

Page 1 of 2 12 LastLast

  1. Posts : 88
    wind 10
       #1

    Window 10 fails to delete the content of the recycle bin with the cmd


    Window 10 fails to delete the content of the recycle bin with the cmd command and ends up with access is denied,

    I tried the cmd code below to delete the content of the recycle bin but ends up with access is denied.
    rd /s c:\$Recycle.Bin

    what could be the issue here?

    Window 10 fails to delete the content of the recycle bin with the cmd-clip_828.jpg
      My Computer


  2. Posts : 4,224
    Windows 10
       #2

    @jamal numan:
    Have you tried lauching an administrative command prompt window to execute this command?
    When I do it that way, the sequence works fine for me, to wit:
    Window 10 fails to delete the content of the recycle bin with the cmd-image.png

    HTH,
    --Ed--

    PS: Personally, I prefer to right-click the Recycle Bin icon and then to select "Empty Recycle Bin" from the resulting pop-up menu. Unlike the preceding command that also deletes any folders (and their contents) that might be in the Recycle bin from other drives besides the C: drive, as well as binned elements from that drive itself. That's because each drive in Windows has its own Recycle Bin.
      My Computers


  3. Posts : 88
    wind 10
    Thread Starter
       #3

    EdTittel said:
    @jamal numan:
    Have you tried lauching an administrative command prompt window to execute this command?
    When I do it that way, the sequence works fine for me, to wit:


    Window 10 fails to delete the content of the recycle bin with the cmd-image.png

    HTH,
    --Ed--

    PS: Personally, I prefer to right-click the Recycle Bin icon and then to select "Empty Recycle Bin" from the resulting pop-up menu. Unlike the preceding command that also deletes any folders (and their contents) that might be in the Recycle bin from other drives besides the C: drive, as well as binned elements from that drive itself. That's because each drive in Windows has its own Recycle Bin.

    Many thanks for the help.
    Is there one command that can delete the content of the recycle bin for all the drives in one go?

    Window 10 fails to delete the content of the recycle bin with the cmd-clip_832.jpg

    - - - Updated - - -

    jamal numan said:
    Many thanks for the help.
    Is there one command that can delete the content of the recycle bin for all the drives in one go?

    Window 10 fails to delete the content of the recycle bin with the cmd-clip_832.jpg
    I did them one by one and it works fine

    Microsoft Windows [Version 10.0.17134.885]
    (c) 2018 Microsoft Corporation. All rights reserved.

    C:\WINDOWS\system32>rd /s c:\$Recycle.Bin
    c:\$Recycle.Bin, Are you sure (Y/N)? y

    C:\WINDOWS\system32>rd /s F:\$Recycle.Bin
    F:\$Recycle.Bin, Are you sure (Y/N)? y
    The directory is not empty.

    C:\WINDOWS\system32>
    C:\WINDOWS\system32>
    C:\WINDOWS\system32>
    C:\WINDOWS\system32>
    C:\WINDOWS\system32>rd /s d:\$Recycle.Bin
    d:\$Recycle.Bin, Are you sure (Y/N)? y

    C:\WINDOWS\system32>

    Window 10 fails to delete the content of the recycle bin with the cmd-clip_834.jpg
      My Computer


  4. Posts : 5,326
    Windows 11 Pro 64-bit
       #4

    Batch script attached to my post will delete temporary files for all drives.
    Window 10 fails to delete the content of the recycle bin with the cmd Attached Files
      My Computer


  5. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #5

    Right click on Recycle Bin and select Empty recycle Bin clears it on all drives.

    Why is it necessary to do this from a Command Prompt?
      My Computers


  6. Posts : 88
    wind 10
    Thread Starter
       #6

    Ztruker said:
    Right click on Recycle Bin and select Empty recycle Bin clears it on all drives.

    Why is it necessary to do this from a Command Prompt?
    this is very slow when using this tool.
    Window 10 fails to delete the content of the recycle bin with the cmd-clip_842.jpg

    Window 10 fails to delete the content of the recycle bin with the cmd-clip_843.jpg
      My Computer


  7. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #7

    You have very large drives I see. Is it a lot slower than using the Command Prompt?

    Maybe empty more often?
      My Computers


  8. Posts : 88
    wind 10
    Thread Starter
       #8

    Ztruker said:
    You have very large drives I see. Is it a lot slower than using the Command Prompt?

    Maybe empty more often?
    It would be great if there is one command line by which the cycle bin gets empty. Is this command available?
      My Computer


  9. Posts : 17,661
    Windows 10 Pro
       #9

    Option Two in this tutorial is the most convenient way to empty Recycle Bin and delete all unnecessary files on all drives with one command: Open and Use Disk Cleanup in Windows 10

    Kari
      My Computer


  10. Posts : 88
    wind 10
    Thread Starter
       #10

    Kari said:
    Option Two in this tutorial is the most convenient way to empty Recycle Bin and delete all unnecessary files on all drives with one command: Open and Use Disk Cleanup in Windows 10

    Kari
    What I wanted here is one single command line that empty the recycle bin for all derives. The command below sounds not perform this in one go

    C:\windows\system32>/c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535

    Window 10 fails to delete the content of the recycle bin with the cmd-clip_905.jpg
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:09.
Find Us




Windows 10 Forums