Unable to delete a file even after I took ownership of the folder it is in.

Logged onto a windows 2012 server as the domain admin.     I was trying to delete a file but I was not able to do so.   I do not have permissions that allow me to do so.   I took ownership of the folder it is in but that did not help.   I believe this file is corrupt but I cannot get rid of it.   Does anyone have any suggestions on how to get rid of the file so I can finish copying the folder from this server to a new server.
patrickmillerAsked:
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.

JohnBusiness Consultant (Owner)Commented:
Get Unlocker 1.9.2  (http://www.majorgeeks.com/files/details/unlocker.html)

Install it, then right click on the file, select Unlocker, Action: Delete and then OK.  See if that deletes the file.

In stubborn cases, run Unlocker again, Delete again and it will say:  Delete at the next restart.  Now you need to find a convenient time to restart the Server.
0
Pete LongTechnical ConsultantCommented:
>> I took ownership of the folder it is in but that did not help

What if you take ownership of the file?
0
patrickmillerAuthor Commented:
It will not let me take ownership of the file.   It says that I need read-only to get to that option.
0
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

JohnBusiness Consultant (Owner)Commented:
Try Unlocker and see if that works. Also try a new , different Admin Windows Account and see if you can delete it that way
0

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
serialbandCommented:
What is the file?  Where is it?  Why are you trying to delete it?  Is this a system file?  Is it in use?
0
patrickmillerAuthor Commented:
No it is not in use.    It is a corrupt file and it will not allow me to remove it.
0
JohnBusiness Consultant (Owner)Commented:
Try suggestions as above
0
Pete LongTechnical ConsultantCommented:
If you use unlocker PLEASE don't click next on everything, or you will get some horrible 'Delta toolbar' software thats bobbins!

P
0
serialbandCommented:
0
patrickmillerAuthor Commented:
Do you have to run unlocker from the server?    I have tried running it from a workstation, as an domain admin, and it is still there.
0
serialbandCommented:
Unlocker must be installed on the system you're using it on.
0
serialbandCommented:
You should really should get it from the source rather than from a download aggregator that directs advertising dollars away from the creator of the software.
http://www.emptyloop.com/unlocker/

Downloading from the author's site supports the author of the software more directly.  I would only ever use the download aggregator if the original site goes away.  Even then, I'd look on archive.org first.
0
JohnBusiness Consultant (Owner)Commented:
Unlocker must be installed on the system you're using it on.

Yes. That is the way I use it and it works well.
0
patrickmillerAuthor Commented:
I tried unlocker and it said I need to reboot.   I will have to do that tonight.   Will let you know.
0
JohnBusiness Consultant (Owner)Commented:
Once rebooted the file should be gone. I have had to do this before.
0
Shaun VermaakTechnical Specialist IVCommented:
run this, then try delete again
attrib -r -a -s -h "C:\ThePath\TheFile.xxx"

Open in new window

0
patrickmillerAuthor Commented:
I tried the attrib command and it failed with Access denied.
 Rebooting is next.
0
Shaun VermaakTechnical Specialist IVCommented:
Did you do it from an elevated command prompt?
0
patrickmillerAuthor Commented:
Yes
0
joinaunionCommented:
If you open up command prompt as admin you can use RD command to try and delete it.

Example,
rd /s /q c:\"directory of the folder"
0
serialbandCommented:
Have you also added your user to the permissions list after you took ownership?  Even if you own it, you may not have permissions to read, write, delete it until you've been added to the permission list or to a group on the permission list.
0
David Johnson, CD, MVPOwnerCommented:
it could be the directory structure is also corrupted.. run chkdsk /f on the volume
0
Michael MachieIT SupervisorCommented:
You may want to remove the file by using the raw name of the file. Sometimes ntfs-named files get corrupted in that file structure.
Try deleting the file on the fat level
cmd as admin
Navigate to the directory the file is in.
dir /x  [to show short names of files]

Identify the short name of the corrupt file. It is sometimes seen like this:
Filena~1
If the filename is 8 or more letters. Once identified..

del Filena~1  [enter]

See if it deletes.

If not..
attrib *.* -h   [enter]
del Filena~1  [enter]
0
Michael MachieIT SupervisorCommented:
I've written up a quick process for you to see what I mean regarding using 'DIR /X' and the short file name (as explained in my comment above).
Please review the example shown and know the file name and path in the error shown does not match the example process file name. I have already fixed my issues and am using a screeshot from historical records to show what a possible error for this issue looks like. I've used this method as recently as last month so it holds true for all windows versions up to last month.
Locked File Delete Example
0
patrickmillerAuthor Commented:
Unlocker worked after rebooting.
0
JohnBusiness Consultant (Owner)Commented:
Thank you for the update and I was happy to help.
0
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 OS

From novice to tech pro — start learning today.