Jump to content
xisto Community
Amezis

Deleting A File That "is In Use"

Recommended Posts

I really need to delete and .exe file that I downloaded a while ago. I accidently transferred that file to my USB-device, to put it on another computer. Now, that file, which is broken, is on 2 computers and my USB device. But I really need to delete it, because it takes up lots of space, and my USB is useless when it's filled up by a broken file that can't be deleted. I have heard that it can be done when I'm starting the computer up, and it is still in DOS.I hope you understand what I need, and tell me how to delete that file. (You can also tell me how to format the USB-thing, since it's the only file on it currently. By the way, I can't right-click on the device and select format - that won't work)

Share this post


Link to post
Share on other sites

To get rid of the file on your USB Drive, follow these steps.1. Goto Start;2. Click 'Run';3. Type 'CMD (Windows XP), COMMAND (Other Window OS).;4. Hit 'Ok'5. Type 'format <drive letter here, see below.>:';6. Press 'Enter' to confirm;7. Type a Volume name, or just hit 'Enter' to leave blank.;8. Type 'exit'To find drive letter, before you start just open My Computer and see what letter was assigned to the device.As for the ones on the computer, im not %100 sure on DOS commands, i'll do some lil research and if i get an answer, i'll let you know here.

Share this post


Link to post
Share on other sites

Ok i did some research and came across the command, follow these steps:Before you start put the .exe file in your ROOT directory to make it easy, like C:1. Goto Start;2. Click 'Run';3. Type 'CMD (Windows XP), COMMAND (Other Window OS).;4. Hit 'Ok'5. At this point you should see something like: C:> on the left hand of the window.6. Type 'Del <Filename.exe> see below;7. Hit 'Enter';8. Type 'exit'<filename.exe> is the .exe's name, now if its saying in use, im not sure what you can do in that sitiution, i believe you would have to start in safe mode, someone with more experince that side can help you, but have a shot.

Share this post


Link to post
Share on other sites

I had a similar problem to this recently, if the post above doesn't work for you try this.

 

This assumes you are using WinXP.

Restart your computer, after it has gone through it's BIOS startup, (the text that says things like "Press ESC for menu" or something similar) but before it displays the "welcome" screen press F8 several times. This should launch a menu that will give you various startup options. Choose "Safe Mode with Command Line".

 

Once the PC has finished it's startup you should be in DOS mode with a prompt saying "C:\" or something similar. Now comes the fun part, you need to navigate to the directory the file is in, if you followed the advice in the post above the file might be C:\ directory. If you didn't or you couldn't move the file you will need to find it.

 

I suggest you start looking in the "Documents and Settings" directory and work from there, most files seem to end up in there. To change to a different directory in DOS type the command CD directory name. For example to change to the "Documents and Settings" directory from the the C:\ prompt, type CD Documents and Settings. To go back a directory level type CD .. Once you find the file, type DEL filename.exe Once you have deleted the file, restart WinXP by typing EXIT and everything should be OK.

 

Hope that helps. :)

 

:EDIT: To view the files in the directory you are currently in, type the command DIR

 

Notice from mayank:
Added the line after EDIT. as it is reported
Edited by mayank (see edit history)

Share this post


Link to post
Share on other sites

I have had similar problems getting rid of files which are unable to be deleted off the hard drive and found a downloadable freeware program called "deletedr" which saved me having to do all of the above.
The download is available from here.
For files which are 'difficult', you might have to do a resart of your computer to ensure that the file is not 'in use' so the software can delete it, but this program has alsways managed to do the deed for me.

Share this post


Link to post
Share on other sites

Now this is kinda really funny. I never knew that it is possible to delete a file which is in use.

 

Anyways, the procedure being explained by tuddy isnt really a way to delete a file which is in use. At least, not in Win XP. I have tried all those and it could not delete my file.

 

And BTW, does anyone in here know how to delete a windows file (4 winxp) that is in root:\WIndows\System32\dll cache. I have got this very stubborn file in there that is really messing up my OS. Actually, it isnt a windows file but it poses as one and I wanna remove it from there entirely.

 

Thanks for your Anticipated help. Hoping to hear from you all.

Share this post


Link to post
Share on other sites

Okay, I managed to format the USB drive following the steps in the first post by tuddy. Thanks! :P Tuddy, on your second post, you asked me to move it to the root of the disk. But moving a file in use is not possible :P Anyway, I managed to delete it, because I downloaded it on a p2p-program, called Ares. Ares can delete the files, and it seemed to work when I deleted the file from the program... Strange...And on my other computer, I used Delete Doctor, posted by jlhaslip. Thanks, it worked too :) Now, the file is gone. :P

Share this post


Link to post
Share on other sites

DO NOT FORMAT A USB DEVICEunless you know exactly what you are doing. Some USB devices are not formatted with FAT, FAT32, or NTFS. Because of this the format command causes error.Also to delete a file "in use"There are a couple of ways1) DOSPress Start>>RunType cmd and press enternow in Win XPpress CD ..\..or, on something elsePress CD ..\..\..\..\.. until you see a prompt C:>Next, if the file is on the c: drive, then skip this step:right click on the file you want to delete and find out what path it is inExample:c:\whatever\whoha\yyy.htmlnow typeCD whatever\whoha\then typeXDEL yyy.html *.txt(XDEL is a takeoff of XCOPY, if you don't have it, you can type DEL yyy.html)now typeDIR yyy.html \hand see if anything shows up.2) WindowsClick on the file and type SHIFT + DELETEThis deletes the file without sending it to the recycle bin. Sometimes this works2b) Windows XPtype CTRL+ALT+DELETEgo to processesright click on explorer.execlick on end process treeclick yesend all programs you have opennow click on file>>newtype in cmdtype in cd ..\..\..\now type in XDEL <your_path_here>type yes or Y2c) Safe modedo the same thing as 2b, but boot up in safe mode (ending explorer can be more dangerous in certain modes)3) SoftwareMine, or other software can do this4) Other ways that you would only understand if you actually knew the answer to your own problem (as it shows a certain level of computer use)

Share this post


Link to post
Share on other sites

What kind of file is it? Is it a video of picture? Windows tries to display thumbnails of videos and pictures. DONT ASUME THAT IF YOU ARE NOT IN THUMBNAIL VIEW THAT THE FILE IS NOT BEING USED BY WIN!It checks other information too. So, when you click a file, it is in use for some time. That time might extend as long as your computer is running :( I know, I know. How should I delete it then, you ask?Well, first you should try wainting. Just like that. Wait some time. Exit folder and eneter again. Wait some time before pressing del.Next, you shoul try entering another directory QUICKLY after you select the file and press delete. This way WIN will look for information in that directory you just entered, and not on your file. If that file is the only one in folder (or directory) create a new folder, put something in it, then as soon as you press del while desired file is selected, enter this newly created folder.If this does not work, close all folder, run command (start->run->type cmd). Navigate to folder where file is located (by using cd dirname). Once there type del filename.extIf windows says that the file is in use even then, then you should enter safe mode and try deleting that way.During startup sequence (when you turn on your comp) press f8 rapeatedlly until boot menu show up. Select safe mode without networking (or with it, it does not matter). Try deleting the file while in safe mode.I hope this was helpful!

Share this post


Link to post
Share on other sites

ThnX for the Explained Informations Guys! It really helped me answer my questions actually! I sometimes wondered if we could actually Stop a running program, which i couldn't do... actually.. But with you guys responses i learned a lot about stopping it..Once again ThnX guys! Good Work! :rolleyes:

Share this post


Link to post
Share on other sites

ThnX for the Explained Informations Guys! It really helped me answer my questions actually! I sometimes wondered if we could actually Stop a running program, which i couldn't do... actually.. But with you guys responses i learned a lot about stopping it..Once again ThnX guys! Good Work! :rolleyes:



I believe there are applications that allows you to view all the processes that are running on your computer and Stop the ones you need,

:) O yea ,infact that function is built into winxp u just have to press CTRL + ALT + Del, and it brings

up Windows task manager, from there you can View the process/programs running on your pc and choose

which one you want to end,

They are also freeware and commercial applications aviable that can give you more control when it comes to ending a running progrmas..do a google search for process killers.

Share this post


Link to post
Share on other sites

ok heres a way to clear the usb hd...right click mycomputer-click manage-click storage-disc management (local)find the disc on there right click again and formatas for the one on your computer turn off the computer boot up and boot in safemode press f10 i think to get that screen log in normaly and stuff and delete the file it wont give you a problem if it does i dont know what to do...

Share this post


Link to post
Share on other sites

actually there is a more safer way to delete unwanted files or folder that is being use without doing the regedit,etc,etc...just use the software call unlocker (i believe the newer version is 1.81) it's a freeware...just do a search in google with the keyword unlocker..Im afraid to say that this software only support windows xp,2000, 2003.what this software can do is: Cannot delete file: Access is denied There has been a sharing violation. The source or destination file may be in use. The file is in use by another program or user. Make sure the disk is not full or write-protected and that the file is not currently in use.hope that helps..

Edited by Flying_Dragon (see edit history)

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

×
×
  • 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.