Jump to content
xisto Community
Sign in to follow this  
speedy

Delete Any File On Xp

Recommended Posts

Many a times when we try to delete a file Windows show an error that the file is being used or some other message and we are unable to delete it. This often happens when the file is infected.Here is a way to delete any file:Go to Start>>Run>>cmdType in the path where the file is located (eg. "cd c:\temp" ), don’t close this windowPress ctrl + alt + delIn processes panel close "Explorer.exe" (you would see that taskbar disappears), dont close the windowIn the command screen delete the file ( del filename )In the task manager click File >> New task >> Explorer.exeTaskbar reappears and the file deletes.This is quite a usefull trick.If anyone know any other easier way to do the same then please share it :) Speedy

Share this post


Link to post
Share on other sites

It can be due:- You are trying to delete an active process, a program that is running in RAM while you try to delete it. Some active use other files that will be write protected too.- It isn't an active process but a document currently opened by another program. i.e.: you are deleting a doc file while reading it with word.- You opened before a data file and the system considers it's still active. I.e.: the same of the doc file, but you already closed it. If you want to delete it without restarting, you can use the file/open window of that program and delete it.

Share this post


Link to post
Share on other sites

Now, this is something new that I haven't tried before. I've run into some problems in XP with files that just won't get deleted. It's usually some movie file which is taking up a whole lot of space. Sometimes, I couldn't delete the file even after rebooting the system in safe mode. It just won't go. I even tried some software that supposedly kills the app which has the stronghold on the file but it just doesn't work. The next time I run into this problem I'll give this a try. Have you tried it before?

Share this post


Link to post
Share on other sites

Dont worry Abhiram, I have tried it before. It is exactly as you have described. Sometimes a audio file or even a folder wont delete no matter how much you try. Sometimes it refuses to delete even after reboot, if it doesn't delete like this also in that case you should try to start computer in safe mode and do the same as above.Thanks for reply guysSpeedy

Share this post


Link to post
Share on other sites

Hehe - just make sure you know what you're deleting so you don't have to reinstall the entire OS after you accidentally dump something important. I haven't had any problems with file errors like this - well, no problems that weren't fixed by closing the app. or rebooting the system, anyway. I'll keep this in mind if those solutions don't work in the future.

Share this post


Link to post
Share on other sites

Yep, be sure that is not a critical process of your system. hehe.If you cannot delete it in safe mode be careful.If you want to by-pass the recylce folder, press shift key at the same time you delete the file. If you are in doubt, type the file name into google and find information about.

Share this post


Link to post
Share on other sites

Euh... There's a button to delete the IE history didn't you know? :)

Anyway, if you can't delete a file which you are supposed to be able to delete, it's in use by something. So what you can do is just close that program (as mentioned above) or insert a line into the autoexec.bat that can be found in your C:\ directory.eg.

del c:\cant_delete_this.txt

autoexec.bat is a batch file that is executed everytime just before the system is fully boot up (should be already existing in your c drive)

Share this post


Link to post
Share on other sites

autoexec.bat is a batch file that is executed everytime just before the system is fully boot up (should be already existing in your c drive)

I thought autoexec.bat was only used upto windows 98 and it's significance has depreciated since windows 2000. The AUTOEXEC.BAT file in my Windows XP is completely blank. Are you sure it'll work? I wonder why it's there in the first place when it's completely blank.

Share this post


Link to post
Share on other sites

Here is a way to delete any file:

Go to Start>>Run>>cmd

Type in the path where the file is located (eg. "cd c:\temp" ), donât close this window

Press ctrl + alt + del

In processes panel close "Explorer.exe" (you would see that taskbar disappears), dont close the window

In the command screen delete the file ( del filename )

In the task manager click File >> New task >> Explorer.exe

Taskbar reappears and the file deletes.

 

This is quite a usefull trick.

If anyone know any other easier way to do the same then please share it  :)

 

Speedy

1064327446[/snapback]


Since you brought this up - have you ever noticed that quite often, when you kill the explorer in this way and restart it using New Task a whole bunch of icons disappear from the System Tray - I mean, among the one's that were running prior to explorer shutdown, only about 70% of them are redisplayed. Anybody faced this before ??

 

This is a good method to release the file-locks and delete them - but sometimes, you'd face some obstinate processes (with corresponding .exe files on disk) - which you'd want to delete. They'd get me stymied completely coz:

1. When I tried to delete the .exe, it would report that the process is running and the file is locked. Hence cannot be deleted.

2. I go to Taskman and close down the process.

3. By the time, I go to delete the process .exe, it had started itself back again and won't let me delete it anymore.. This got me immensely infuriated in many situations.

 

What you need is a tool that'd KILL the process from memory and delete the file from the disk (in realtime - at the same time). Hence I went out on a hunt and found this tool - which came to extremely good use thereafter, particularly for virulent processes - which'd spawn themselves as soon as you shut them down.

 

Here's where you get it:

1. http://www.bleepingcomputer.com/download/windows/

2. http://forums.xisto.com/no_longer_exists/

 

This tool ALSO works for the kind of locked files speedy mentioned. Here's a brief intro:

Pocket KillBox is a program that can be used to get rid of files that stubbornly refuse to allow you to delete them.

 

Usage Information:

 

Download this file, extract it, and run the killbox.exe file. When it loads type the full path to the file you would like to delete in the field and press the Delete File button (looks like a red circle with a white X). It will prompt you to reboot, allow it to do so, and hopefully your file will now be deleted.

 

Source: http://www.bleepingcomputer.com/download/windows/

 


It's a MUST ADDITION to your toolbox. Go grab it NOW :)

Regards,

m^e

Share this post


Link to post
Share on other sites

Since you brought this up - have you ever noticed that quite often, when you kill the explorer in this way and restart it using New Task a whole bunch of icons disappear from the System Tray - I mean, among the one's that were running prior to explorer shutdown, only about 70% of them are redisplayed. Anybody faced this before ??


Yea, I come across that all the time. This is a little annoying because, sometimes, you might want to do something with a program running in the systray and you can't access it and when you try to run it from the start menu, it says "another instance runnign in the background, please kill that first and then start a new one". Is there any way to fix this other than killing the processes in the task manager?

Share this post


Link to post
Share on other sites

Euh... There's a button to delete the IE history didn't you know? :)

 

Anyway, if you can't delete a file which you are supposed to be able to delete, it's in use by something. So what you can do is just close that program (as mentioned above) or insert a line into the autoexec.bat that can be found in your C:\ directory.eg.

del c:\cant_delete_this.txt

autoexec.bat is a batch file that is executed everytime just before the system is fully boot up (should be already existing in your c drive)

1064327516[/snapback]


Not to get on your case that much but I hope you haven't been visiting any sites that you might be embarrassed for others to see. As it turns out, just by clearing the cache in IE (Tools>Internet Options>Clear History, Delete Cookies, and Delete Files) you are not actually getting rid of all of you history. Itâs kind of a dirty little secret by Microsoft. As I wrote this I cleared everything out and then downloaded a utility that will view the cache. Index (History) Reader for Internet Explorer ÂŽ 4, 5 or 6 [ /IndexReader/index.html ] was the first one that I found at http://download.cnet.com/windows/. I ran the program and there were still sites in the history.

 

The program that I used is one of the quick viewers that anyone can get. I know for a fact that some of the advanced forensic tools that you have to pay big bucks for can ferret out unerased cache very easily and efficiently.

 

Several files are involved in keeping the cache of Internet Explorer

 

C:\Documents and Settings\<username>\Cookies\index.dat

C:\Documents and Settings\<username>\Local Settings\History\History.IE5\index.dat

C:\Documents and Settings\<username>\Local Settings\History\History.IE5 \MSHistXXXXXXXXXXX\index.dat

C:\Documents and Settings\<username>\Local Settings\Temporary Internet Files\Content.IE5\index.dat

C:\Documents and Settings\<username>\UserData\index.dat

 

Any of the above files can hold site information and you will notice that if you open Windows Explorer and go to C:\Documents and Settings\<username>\Local Settings\History\ there will be no files but a special display with the timeframe of cached files. Furthermore even if you open a DOS windows and browse to this location you will not see any files. Apparently if a file is marked as system, archive, and hidden you will not be able to see it on the OS no matter what. I had to write my own VB.NET program to list the files and subdirectories. After locating the files the very hard way I tried to delete them only to find out that they were in use by IE, even when IE was not in use. All the index.dat files are in use from the time Windows start will the time Windows shuts down. The only way that I have found thus far to remove them is to get special third-party software that will delete them before Windows full starts. Another approach is to boot into safe mode and then delete them.

 

When I asked earlier if this also worked on IE cache this is what I meant.

 

References:

http://www.acesoft.net/delete_index.dat_files.htm

http://browsertools.net/IE-Privacy-Keeper/index-dat.html

http://www.milincorporated.com/a_indexdat.html

/IndexReader/index.html

Share this post


Link to post
Share on other sites

If any of you want to clear your tracks totally (I do this once a month), then use CCLeaner. The latest releases are swines to install. They seem to have some vendeter against being used <.< Anyway, when I used it last, it removed 185MB of Adobe History, IE files and such that were untouched by anything else. And that is after me formatting the hard drive.Why is it, that so many people can delete their temporary files and not suffer, yet when I do it, my whole system seems to get cleared out. I am having no luck. Perhaps I should give in now.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.