Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Undeletable Files

17 Jan 2015   #1
Corrupt3d

Windows 7 Home Premium 64 Bit
 
 
Undeletable Files

Hey,

I was trying to delete a few .txt files in the Cookie folder, I've tried several programs such as CCleaner, Unlocker, SpyBot Search & Destroy but I cannot delete those files.

I've also tried to delete them by using commands but it tells me "Access denied" screenshot below.


I can't delete them no matter what I do. If you have any suggestions / ideas feel free to share.


Thanks in advance.


My System SpecsSystem Spec
.
17 Jan 2015   #2
RolandJS

Windows 7 Professional 64-bit
 
 

EMCO Move [& Delete] on Boot, a freebie, may be your best bet. It's geeky! And it works MOST of the time.
My System SpecsSystem Spec
17 Jan 2015   #3
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Heyas,

I assume "Zugriff verweigert" translates to "Access denied". Even when forcefully deleting files from an elevated command prompt, you must have enough permissions on the file objects to delete them.

Attached is a batch file. It deletes all files in the folder it's in (including itself), after it grants the correct permissions on each file in the folder. It deletes quite powerfully, so be absolutely sure that it is in the right location when you run it.

Preview:
Code:
@echo off
net session >NUL 2>&1|| powershell Start-Process '%0' -Verb RunAs&& exit /b|| exit /b
pushd "%~dp0"
takeown /f "*"
icacls "*" /grant:r "%USERNAME%":f
attrib "*" -r& attrib %0 +r
del "*"& popd& del /f %0


Attached Files
File Type: bat th-358716.bat (216 Bytes, 12 views)
My System SpecsSystem Spec
.

18 Jan 2015   #4
Corrupt3d

Windows 7 Home Premium 64 Bit
 
 

Thanks to both of you, I was finally able to remove those .txt files.
My System SpecsSystem Spec
19 Jan 2015   #5
RolandJS

Windows 7 Professional 64-bit
 
 

Pyprohly, I added the following two lines to my copy of your very good batchfile:
rem powershell delete present files & present directory
rem Ensure this BATchfile is in desired directory to delete; if not, CTRL-BREAK now.

-- will that work? Or, am I mistaken about Powershell??
My System SpecsSystem Spec
19 Jan 2015   #6
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Hi Roland,

Quote   Quote: Originally Posted by RolandJS View Post
[W]ill that work? Or, am I mistaken about Powershell??
Could you clarify what you are asking?

And I do not recommend you keep a copy of this batch file, or edit it in anyway. It's dangerous(ly powerful).
My System SpecsSystem Spec
30 Jan 2015   #7
RolandJS

Windows 7 Professional 64-bit
 
 

Ahhh, I finally remembered this thread, yes, batchfile iced into my HD "freezer."
My System SpecsSystem Spec
Reply

 Undeletable Files




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Making files undeletable
Hi everyone. :) I have Windows 7 HP with 2 user accounts. 1 admin and other under the "users" group. I have a folder on the HD that I don't want the any "user" to access except admin. What I have done is set the folder attributes to hidden and system protected (attrib +s +h). Now the folder is...
General Discussion
How to delete Undeletable folders or files from any Drive
Help me. I have three partitions/drives i.e drive C, drive D and drive E. I have installed windows7 Ultimate x86 on drive C. But i have a problem in drive E. There is a folder on drive E which I want to delete. I tried many times to delete that folder but failed every time. If someone know than...
General Discussion
undeletable files and double entries
Hi all! I got a problem with double entries which I found out while selecting a new background. I want to learn how I can remove double entries in picture location list. http://www.imgbox.de/users/ksfno1/double_entry_1.png Also an error message appears when I select either...
General Discussion
Undeletable files on external drives. Help please.
This is my first ever post - Thanks for reading it. I'm having problems with my security tabs on my external hard drives. I can't delete/move files one of my externals. I've read through other threads and forums that say I can set accessibility on the drive through the security tab, but I have...
Hardware & Devices
deleting undeletable folders/files.
i have 3 or 4 folder which are giving me an error message saying something about me not having permission. ive tried taking ownership and giving myself full permissions but i stll cant delete them.
General Discussion
Deleted user but files remain -- undeletable
Hey all, I just deleted a user, and I want to totally get rid of it. When given the option to keep or delete the files, I said delete. However, when I go to C:\users\ the folder is still there, and it cannot be deleted. The icon shows a little lock. As an aside, I am trying to delete the...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 04:25.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App