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

Page 1 of 2 12 LastLast
  1. jamal numan's Avatar
    Posts : 41
    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?

    Click image for larger version. 

Name:	Clip_828.jpg 
Views:	61 
Size:	139.6 KB 
ID:	241719
      My ComputerSystem Spec

  2. EdTittel's Avatar
    Posts : 3,474
    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:
    Click image for larger version. 

Name:	image.png 
Views:	59 
Size:	16.9 KB 
ID:	241720

    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 ComputersSystem Spec

  3. jamal numan's Avatar
    Posts : 41
    wind 10
    Thread Starter
       #3

    EdTittel said: View Post
    @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:


    Click image for larger version. 

Name:	image.png 
Views:	59 
Size:	16.9 KB 
ID:	241720

    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?

    Click image for larger version. 

Name:	Clip_832.jpg 
Views:	1 
Size:	235.3 KB 
ID:	241725

    - - - Updated - - -

    jamal numan said: View Post
    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?

    Click image for larger version. 

Name:	Clip_832.jpg 
Views:	1 
Size:	235.3 KB 
ID:	241725
    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>

    Click image for larger version. 

Name:	Clip_834.jpg 
Views:	1 
Size:	181.2 KB 
ID:	241726
      My ComputerSystem Spec

  4. FreeBooter's Avatar
    Posts : 1,862
    Windows 10 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 ComputerSystem Spec

  5. Ztruker's Avatar
    Posts : 8,800
    Windows 10 Pro X64 1903 18362.295
       #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 ComputersSystem Spec

  6. jamal numan's Avatar
    Posts : 41
    wind 10
    Thread Starter
       #6

    Ztruker said: View Post
    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.
    Click image for larger version. 

Name:	Clip_842.jpg 
Views:	1 
Size:	85.7 KB 
ID:	241820

    Click image for larger version. 

Name:	Clip_843.jpg 
Views:	1 
Size:	206.6 KB 
ID:	241821
      My ComputerSystem Spec


  7. Ztruker's Avatar
    Posts : 8,800
    Windows 10 Pro X64 1903 18362.295
       #7

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

    Maybe empty more often?
      My ComputersSystem Spec

  8. jamal numan's Avatar
    Posts : 41
    wind 10
    Thread Starter
       #8

    Ztruker said: View Post
    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 ComputerSystem Spec

  9. Kari's Avatar
    Posts : 16,319
    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 ComputerSystem Spec

  10. jamal numan's Avatar
    Posts : 41
    wind 10
    Thread Starter
       #10

    Kari said: View Post
    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

    Click image for larger version. 

Name:	Clip_905.jpg 
Views:	2 
Size:	226.9 KB 
ID:	243515
      My ComputerSystem Spec


 
Page 1 of 2 12 LastLast

Related Threads
I've recently made some bat scripts to do some stuff with zip files, extract and sort/rename etc blah blah blah not important. As part of the cleanup I have it delete the zip file once its extracted however something went wrong the other day and it...
Greetings, I've noticed two somethings in Windows 10 for ages. I'm wondering if it's normal and the way things are. I'm using the latest of everything but no betas. FOLDER CONTENTS COUNT WRONG Suppose I want to know how many items are in...
I am hoping someone has any ideas on this weird problem. I just upgraded to 10 from 7 yesterday on a Toshiba sattelite 64 bit. Everything went perfect. About 30 mnutes after I noticed a popup window stating “confirm you want to send pictures folder...
What is this? How to fix? Long green progress bar that never finishes in explorer. 35702
I used Unlocker to get rid of ALL the "Protected" Files I had in C:\ temp folder from a NovaBackup Restore. ALL deleted files went into the Recycle Bin. I forgot to change setting in Recycle Bin Properties to Delete files and NOT save them. Well,...
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 23:42.
Find Us