Undeletable Files

Corrupt3d

New member
Local time
3:51 PM
Messages
2
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.
29lk8bq.jpg


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


Thanks in advance.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
CSL
OS
Windows 7 Home Premium 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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Antec desktop; Acer Aspire laptops
OS
Windows 7 Professional 64-bit
CPU
Desktop i5; Acers i5 & i7
Memory
desktop 16GB; 1 Acer 8GB & 1 Acer 16GB
Hard Drives
1TB split into 2 equal partitions [OS and data] usable by RJS
Internet Speed
AT&T DSL
Browser
FF, GChrome, msIE
Other Info
Windows 7 Firewall, Emsisoft AM/AV, MSE [scan-only], SpywareBlaster, Ruiware/BillP combine
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
 

Attachments

Last edited:

My Computer

Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
Thanks to both of you, I was finally able to remove those .txt files.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
CSL
OS
Windows 7 Home Premium 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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Antec desktop; Acer Aspire laptops
OS
Windows 7 Professional 64-bit
CPU
Desktop i5; Acers i5 & i7
Memory
desktop 16GB; 1 Acer 8GB & 1 Acer 16GB
Hard Drives
1TB split into 2 equal partitions [OS and data] usable by RJS
Internet Speed
AT&T DSL
Browser
FF, GChrome, msIE
Other Info
Windows 7 Firewall, Emsisoft AM/AV, MSE [scan-only], SpywareBlaster, Ruiware/BillP combine
Hi Roland,

[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 Computer

Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
Ahhh, I finally remembered this thread, yes, batchfile iced into my HD "freezer."
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Antec desktop; Acer Aspire laptops
OS
Windows 7 Professional 64-bit
CPU
Desktop i5; Acers i5 & i7
Memory
desktop 16GB; 1 Acer 8GB & 1 Acer 16GB
Hard Drives
1TB split into 2 equal partitions [OS and data] usable by RJS
Internet Speed
AT&T DSL
Browser
FF, GChrome, msIE
Other Info
Windows 7 Firewall, Emsisoft AM/AV, MSE [scan-only], SpywareBlaster, Ruiware/BillP combine
Back
Top