Force deleting a file - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 07-15-2006, 05:04 PM   #1 (permalink)
True Techie
 
mr_wizard's Avatar
 
Join Date: Oct 2005
Posts: 114
Default Force deleting a file

I get this same error message "Cannot delete file because it's either write protected or in use". Using Safe Mode or even rebooting or logging off isn't an option. Any ideas?
__________________

mr_wizard is offline  
Old 07-15-2006, 05:15 PM   #2 (permalink)
Monster Techie
 
MrCoffee's Avatar
 
Join Date: Feb 2006
Location: UK
Posts: 1,858
Default

how about terminating the process thats using the file, deleting the file then launching the process again.

THere are some core parts of windows that will force a restart if you terminate them though.
__________________

__________________
Intel core I7 920
GA-EX58-UD3R
6GB OCZ platinum 1600
XFX HD4890
Noctua nh-u12p
Corsair HX520
Antec 300
Samsung 1TB F1 Spinpoint
Samsung SM2443BW 24"
MrCoffee is offline  
Old 07-15-2006, 05:44 PM   #3 (permalink)
True Techie
 
mr_wizard's Avatar
 
Join Date: Oct 2005
Posts: 114
Default

Yeah, I have no idea which program would be using it. I have several on here running. Oh well, thanks for the help though.
mr_wizard is offline  
Old 07-15-2006, 05:51 PM   #4 (permalink)
Super Techie
 
Join Date: Jun 2006
Posts: 489
Default

(1) You can't delete them because they have special attributes that won't let you delete them. Do this:

Start-Run-cmd

Type:

cd\

At the c:\ prompt cd to the dir that the files are in, type the following:

attrib -r -a -s -h *.*

then try deleting all the files in that dir by typing

del /f *.*

The /f switch will force delete files with read-only attribute (just in case) The files should delete. You should do the same thing if there are any subdirectories.
__________________
Torvalds was contemptuous of Microsoft's claims and has asked Redmond to name the patent infringements so that their veracity can be challenged and workarounds found.
"Naming them would either make it clear that Linux is not infringing at all (which is quite possible, especially if the patents are bad), or would make it possible to avoid infringing by coding around whatever silly thing they claim,"

"So the whole 'We have a list and we're not telling you' should tell you something. Don't you think that if Microsoft actually had some really foolproof patent, they'd just tell us and go, 'nyaah, nyaah, nyaah!'?"

whole story here: http://www.vnunet.com/vnunet/news/21...-microsoft-put
kpmwrestler is offline  
Old 07-15-2006, 08:25 PM   #5 (permalink)
True Techie
 
mr_wizard's Avatar
 
Join Date: Oct 2005
Posts: 114
Default

Still gives me access is denied. This is an MPEG I downloaded from apple.com. I think I tried opening it once and it errored out. But I don't have any instances of media players running in the background. So I'm not sure what would be using this... And I can't restart because there's a password on the comp to log in that I forgot to ask the owner about. So I would have to do it without that.
mr_wizard is offline  
Old 07-15-2006, 08:37 PM   #6 (permalink)
Monster Techie
 
MrCoffee's Avatar
 
Join Date: Feb 2006
Location: UK
Posts: 1,858
Default

create a text file task.txt on the C:\ root then run this command from the command line

tasklist > C:\task.txt

then copy&paste the content of the file here and we'll take a look and see what processes to kill.
__________________
Intel core I7 920
GA-EX58-UD3R
6GB OCZ platinum 1600
XFX HD4890
Noctua nh-u12p
Corsair HX520
Antec 300
Samsung 1TB F1 Spinpoint
Samsung SM2443BW 24"
MrCoffee is offline  
Old 07-16-2006, 08:28 AM   #7 (permalink)
Super Techie
 
Join Date: Jun 2006
Posts: 489
Default

You could make a xp boot disk and then make a batch file that says:
@echo off
cd\
cd (wherever the files are)
attrib -r -a -s -h *.*
del /f *.*
:END




Or you could delete the files yourself without the batch file.


When it is running off the boot disk, It is even better than safe mode. The files will propably delete since the os isn't using them. (it is running off the boot disk)
__________________

__________________
Torvalds was contemptuous of Microsoft's claims and has asked Redmond to name the patent infringements so that their veracity can be challenged and workarounds found.
"Naming them would either make it clear that Linux is not infringing at all (which is quite possible, especially if the patents are bad), or would make it possible to avoid infringing by coding around whatever silly thing they claim,"

"So the whole 'We have a list and we're not telling you' should tell you something. Don't you think that if Microsoft actually had some really foolproof patent, they'd just tell us and go, 'nyaah, nyaah, nyaah!'?"

whole story here: http://www.vnunet.com/vnunet/news/21...-microsoft-put
kpmwrestler is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 11:37 AM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.