« Don't Be A BotHang Up To Virus Removal Windows 7 »

Delete a File When Access is Denied

02/23/12

Permalink 12:02:03 pm, by admin, 321 words   English (US) latin1
Categories: Computer Help

Delete a File When Access is Denied

  

If you have ever tried to remove a virus or spyware manually you may have seen this condition on a Windows based PC, laptop or server.
When you attempt to delete a file Windows denies you access because the file is in use by another program.
There is a way to delete the culprit.

Lets say for instance you need to delete a file called spyware.exe.
But try as you may Windows says the file is in use and denies the delete.

Follow up:



Simply create a .bat file in the folder with the file and execute it.

So lets say spyware.exe is located in C:\example.
In the folder C:\example
Right Click and select New > Text Document
Rename the newly created file anything you like but it must end in .bat
So I name my file delete.bat
Right click on delete.bat and select EDIT
Copy and paste this into the delete.bat file:

:start
tskill spyware.exe
del spyware.exe
goto start

(now of course you will replace the name spyware.exe with that actual name of the file you wish to delete)
Click on File and select Save.
Close the .bat file.

Click on the Windows Button or the Start Button (depending on your windows version)
Click on Run
Click on Browse
and then navigate to the folder you placed your .bat file in.
For our example we would choose C: Drive, then the folder Example
in that folder we would choose delete.bat
and select Open then hit OK.
The bat file should run in a rapid fire loop until the file is deleted,
in our case we would no longer see spyware.exe inside the folder C:\example.

The trick is to keep trying to stop the function and delete the file so fast it can not start again.

Like Computer Care on FaceBook
Follow us on Twitter
computer Care on Pinterest
computer Care on instagram
Visit the Computer Care Catalog Online for all your part needs.

Bookmark this article at ...

1 comment

Comment from: KevinDrin [Visitor] · http://longpathtool.com
Here is a tool you can use to solve Del Access Denied problem
http://longpathtool.com
03/02/12 @ 02:43

Comments are closed for this post.

September 2017
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
We will be posting information to aid you in the repair of your DesignJet Plotter and LaserJet Printer, Computer or Network.

We will do our best to answer questions you may have. We will also make every effort to post as much information as we can on each and every topic.

Sponsor

Donation

Did this site save
(or help earn) you money?
Say thanks with a
small donation.
easter-northeast

Search

XML Feeds

Disclaimer

All information is presented As-Is, with no warranty. Use at your own risk. DesignJetParts.com is operated by Computer Care. One Stop for all you computer, printer, plotter and network parts and supplies
powered by b2evolution
Our Sitemaps: XML  HTML  ROR