1.    04 Jan 2016 #1
    Join Date : Jan 2016
    Posts : 4
    Windows 10

    Problem with deleting directories from the c dive.


    I have about 500 empty directories on my c: drive with names like the ones pasted below. I believe a failed Quicken install left them there. Anyway, normally this would be no big deal, but in this case, they are all at the root level and it makes my "real" directories hard to find. I've tired several things to get rid of them. Here's an example of one of my attempts from an Administrators command shell:

    dir *.tmp
    . . .
    09/11/2015 04:51 PM <DIR> QuiFAC7.tmp
    09/11/2015 04:51 PM <DIR> QuiFAC8.tmp
    09/11/2015 04:51 PM <DIR> QuiFAD9.tmp
    0 File(s) 0 bytes
    501 Dir(s) 1,337,724,145,664 bytes free

    C:\>rmdir quifad9.tmp
    Access is denied.


    C:\>takeown /f quifad9.tmp /a


    SUCCESS: The file (or folder): "C:\quifad9.tmp" now owned by the administrators group.


    C:\>rmdir quifad9.tmp
    Access is denied.

    I've tried it with PowerShell and with the "hidden" Administrator id, no luck. I also tried to change the security setting for the c: drive itself, also with no luck. Do any of you have a PowerShell script or something similar which will remove these annoying empty directories?

    John



      My ComputerSystem Spec
  2.    04 Jan 2016 #2
    Join Date : Apr 2015
    Posts : 12,999
    W10Prox64

    Quote Originally Posted by TexasJohn View Post
    I have about 500 empty directories on my c: drive with names like the ones pasted below. I believe a failed Quicken install left them there. Anyway, normally this would be no big deal, but in this case, they are all at the root level and it makes my "real" directories hard to find. I've tired several things to get rid of them. ....

    I've tried it with PowerShell and with the "hidden" Administrator id, no luck. I also tried to change the security setting for the c: drive itself, also with no luck. Do any of you have a PowerShell script or something similar which will remove these annoying empty directories?

    John
    Hi TexasJohn and welcome to Tenforums.

    Perhaps you can try booting to this custom Win10PE disk one of our members has prepared.
    Windows 10 Recovery Tools - Bootable Rescue Disk - Windows 10 Forums

    You can try deleting the directories that way.
      My ComputerSystem Spec
  3.    05 Jan 2016 #3
    Join Date : Jan 2015
    UK, Midlands
    Posts : 11,135
    Win 10 Pro (1703)

    The trick is to delete them without Windows running. Thus if you have Windows installation media, you can boot from that, select Repair, Troubleshooting, and navigate to a command prompt.
      My ComputerSystem Spec
  4.    05 Jan 2016 #4
    Join Date : Jul 2015
    Posts : 3,822
    10 Pro

    The owner of an object doesn't necessarily have authority to do anything with it (except change authority). You have to both take ownership and grant authority - it was the second step you were missing.

    As they are directories you should specify /r on takeown and /t on icacls to recurse through any contained files/directories also.
    Code:
    takeown  /f  quifad9.tmp /r
    icacls  quifad9.tmp /grant "%USERDOMAIN%\%USERNAME%":(F) /t

    If they are locked though you'll need to delete them from outside windows (or at least when whatever is locking them isn't running) as mentioned in the posts above.
    Last edited by lx07; 05 Jan 2016 at 05:36. Reason: recurse
      My ComputerSystem Spec
  5.    05 Jan 2016 #5
    Join Date : Jan 2016
    Posts : 4
    Windows 10
    Thread Starter

    That worked!


    Thank you, the icacls command did the trick. All those directories have now been deleted.
      My ComputerSystem Spec

 


Similar Threads
Thread Forum
Problem Deleting Folder on OneDrive
I've been backing up some of my stuff on OneDrive, and today, when I tried to rename one of the folders on OneDrive I got an error message saying that the path was too long. I clicked No/Cancel/Whatever-it-was-called thinking that it would abort the...
Software and Apps
Win 10 changed my healthy logical dive into a recovery partition
Hi, I hope this can be reversed. I was using my machine normally when it suddenly went dead while using file explorer, no BSOD, just stopped, no cpu activity light, nothing responsive. I had to power off at the PSU and then re-start which it did....
Drivers and Hardware
CD/DVD Dive down
The upgrade from Windows 7 to Windows 10 knocked my CD/DVD Lightscribe drive out. At the moment it isn't a problem, as these days most everything can be run without a CD, but long-term it will cause me some measure of inconvenience. I've checked...
Drivers and Hardware
Solved Edge Favorites - problem deleting favorites
I have not been able to delete favorites from the "Favorite Bar" drop down list. The right-click and the delete key do not work.
Browsers and Email
A deeper dive into the Universal Windows Platform
Source: A deeper dive into the Universal Windows Platform
Windows 10 News
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 13:01.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums