Can't delete a folder, or take ownership, or read access

Just finished a server migration and am cleaning up some unneeded files. One of them is a folder that used to hold backups for one of the client machines. The folder's contents mostly deleted except for one folder:

Access denied
Tried several times to delete, but the system is telling me that I don't have read access to it, which appears accurate.

No read access message
After trying to elevate
I've tried several Setacl commands as well as takeown (the name of the folder is "System.Data.Entity.#":

SetAcl.exe -on System.Data.Entity.# -ot file -actn setowner -ownr n:administrators -rec cont_obj
Processing ACL of: <System.Data.Entity.#>
Reading the SD from <System.Data.Entity.#> failed with: Access is denied.


takeown /f  System.Data.Entity.# /r /d y
ERROR: Access is denied.


Is there something else I should be trying? This folder is nothing and just needs to go!

Thanks,

Rob
robklubsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pjamCommented:
File path looks pretty long, can you move the folder to a shorter name?  Max is 260 characters.
also make sure it is not an open file, see picture below:
manage open filesLook for your file and close it.
robklubsAuthor Commented:
Thanks for the quick response. I'm running Windows 2012 and don't see that screen that you shared. But it did check computer management | System Tools | Shared Folders | Open files and did confirm that that folder is not opened.

However, I am getting this message that the folder is in use when I try to rename it (to shorten):

Tried to rename, folder is in use
robklubsAuthor Commented:
Path is ~137 characters long. Was able to deleted all except for this folder.
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

pjamCommented:
That obviously was from Server Manager in Windows 2008.  I have 2012 servers but they are not for file sharing, so not sure where Open file management is located.
How long is the path?  Can you rename the file or one of the folders?  probably not.
robklubsAuthor Commented:
I think we posted at the same time, or close to it.

You are correct; cannot rename any of the folders. Path is about 137 characters long.
pjamCommented:
137 should be good.
Does it have an illegal character?  Surprisingly, windows allows that some times and then just try to do anything with it.  I see this especially from MAC people.
robklubsAuthor Commented:
No illegal characters. Here is the full path:

E:\ServerFolders\Company\SharedData\DR-SHIPPING-Warehouse\latest\DRIVEC\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Data.Entity.#

There folder is zero bytes according to Windows. If that's true there's probably nothing in it. However, I just checked the location from which is was copied and there are a couple of files in there but it would only get the path up to 203 or so.

I'm confused on  how one message tells me that the folder is in use and the others say I need read access.
robklubsAuthor Commented:
Just a thought, but I thought I might try to use Shadow copy to restore that folder. It's there, but the contents look completely different:

Assembly folder from shadow copy
I don't really understand what is happening. Windows shows a folder there (see a pics a few posts up) but shadow copy shows something quite different.

Should I try to restore it?
robklubsAuthor Commented:
Restore did not work, did not have access to overwrite the folder.
pjamCommented:
Can you try a reboot?
Another idea might be to turn off Shadow copy to see if that is holding it.  strange that it says its open in another window.
A couple of posts about open files in 2012:
https://social.technet.microsoft.com/Forums/windowsserver/en-US/aaa6ccf5-0578-4ef7-88b7-07ce6c64033c/how-to-close-an-open-file?forum=winserver8gen
https://technet.microsoft.com/en-us/library/cc725689.aspx?f=255&MSPPError=-2147217396

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
robklubsAuthor Commented:
I will try a reboot - and see where that leads. Most likely won't be until later on this evening.
robklubsAuthor Commented:
Reboot did the trick! Before I did, I used process explorer to see if I could find the file. Turns out it was the Windows Server Essentials Storage Service (storageservice.exe) that had hold of the file/folder. Not sure why or how. It's possible that I could have restarted the service and had the same fix, but after the reboot the folder that I was trying to get rid of was gone.

Thanks!
robklubsAuthor Commented:
The solution provided worked, but restarting the service would have also worked.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.