how can we delete a file.?

By AhmadRasheed ·
hi all. I always ask this question how can we delete a file which is being used by another program specially i don't know that program name or process. e.g when i try to remove autorun.inf a message pops to me said " you can't delete this file it is used by another program."
any answer will help. thanks

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Request for Clarification

by brian_meahan - In reply to Clarifications

Maybe you need to give some detail on why you are trying to delete the file and/or what specific problem you are having and there might be some other options to accomplish this.

Collapse -

Short answer : you can't. Let's explain

by JipFromParis In reply to how can we delete a file. ...

The short answer is : you can't

On modern operating system when a program opens a file it tells the OS how it intend the file to be shared with other programs; On your computer at least one program has opened the autorun.inf file while requesting other programs to be prevented to delete this file.
First you will have to find which program(s) hold the file and then you will have to terminate this/those program(s). As far as I understand from tags associated with your question you are using a Windows OS. "Process Explorer" a free tool from SysInternals may help you to do so. The company has been acquired by Microsoft and their tools are now available from the site.

Caution : If a program opened the file and prevented deletion there may be some very good reasons for that. Deleting the file may prevent the program to run anymore.

Collapse -

not a good idea to be

by PurpleSkys In reply to how can we delete a file. ...

deleting system files's a little info on what you're trying to delete

Collapse -

Two options

by Asknetguy In reply to how can we delete a file. ...

If the file resides on read-only media - you can't delete it. So if your autorun.inf is on a cd, you can't delete it.
If the file is constantly in use however, there is an option. It's called unlocker.
Warning, if you screw up your OS with this program, don't say I didn't warn ya :)

Collapse -

Only way to leard

by dayen In reply to how can we delete a file. ...

For some people it the only way to learn. My question is why do you want to delete autorun.inf it can be disable if your not skilled deleting is just bad if you just don't want a cd to run hold down shift when you put it in.

Related Discussions

Related Forums