2

I'm using Windows 8.1 and I'm trying to delete a folder on a secondary hard drive. I tried a things that I had read here, but nothing seems to be working.

Here's what I've done:

  1. Tried rd command in Windows Powershell to remove the folder. It said access denied.

  2. Right click the folder, clicked Properties, Security, Advanced and I see that there is no owner of the folder. This is odd.

  3. The folder is set to read-only and I cannot change it to archive because i get access denied.

  4. I tried making a delete.bat file with the following in it:

    SET DIRECTORY_NAME="D:\xampp\htdocs\webfolder\!ARCHIVE\httpdocs\sites\default\files"
    TAKEOWN /f %DIRECTORY_NAME% /r /d y
    ICACLS %DIRECTORY_NAME% /grant administrators:F /t
    PAUSE
    

I run this as Admin and it does not work, i get a access denied error. Weird.

  1. The last thing i tried was in Windows Powershell ran as Admin, I used this command:

    icacls files /reset /T 
    
  2. I just tried this too and i get access denied, so i cant takeown of it.

    takeown /f <directory> /r
    

    I get Access Denied.

Can someone help? I'd really like to remove these folder from my computer.

1 Answer 1

0

Problem Solved!

Originally, i had performed a Cut + Paste operation to move all of the files and folders from the D drive to my C drive. I had gotten a few errors for a few files that said that i can't move these files because the length of filenames was too long.

I was going through each folder that remained and deleting them after getting the files out of those folders. Then I ran into a problem where it would let me delete the "files" folder. I tried a bunch of different things with no luck.

Out of desperation, I decided to restart my computer. TADA! That solved the problem. When i go that folders location, the folder is now gone. Perhaps it was a ghost in the machine.

Moral of the story is always try a reboot before posting to the forums! :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .