|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
Hello,
I wanna ask if there is any Windows command or with any .dll , .exe file that can i delete a file that is in use!
- Thanks!
|
|
|
|
Joined: Dec 2002
Posts: 2,031
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,031 |
Delete a file from within mIRC or in Windows? Try this http://unlocker.emptyloop.com/
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
I am looking for a command or utility that will work with no setup.
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
According to the help file: /remove [-b] <filename>
Deletes the specified file.
The -b switch deletes the file and moves it to the recycle bin. If this is what you're looking for.... This command is mIRC specific. * And you still haven't answered RoCk's question.Delete a file from within mIRC or in Windows?
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
I knew the mIRC command but if a file is in use the mIRC does not delete it and returns an error!
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
There *may* be a built-in Windows method to delete files that are in use (perhaps using COM), but I'm not sure. Normally, you have to use a third party utility or restart the computer if you aren't able to get the file out of use.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
You can try this by entering the command via mIRC: Replace file.txt with the actual file name you wish to delete. This opens the window command prompt momentarily and executes the deletion of a file.
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
There's a "bug"(?) in older(?) versions of windows that allows you to rename a file that is in use and delete that. The file will continue to be in use, though.
If that doesn't work, you cannot delete a file that is in use, nor should you try. Stop using it, first, then delete it.
No builtin command work if the standard right click -> delete functionality in the Windows Explorer does not work. Windows gives you this message for a reason.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Yeah, that author is full of it. The del command isn't going to do anything (other than giving you an error) if you can't right click and delete the file. (Or if /remove doesn't work in mIRC)
The file has to be closed before deleting it. I believe third party utilities just find a way to close it. Perhaps they find out what program is using it and close that. I really don't know because I don't bother. I have just restarted the computer the few times I've had a file that was marked as being in-use.
Last edited by Riamus2; 08/03/11 11:17 AM.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
A simple test (say, copy some audio file, play the file and try to delete while playing) will show that this won't work. As pointed out, you have to e.g. close the file handle first - and there's no simple command for the task, even though there are user-friendly tools for it (like the one RoCk linked to).
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
Thank you two for the reconfirmation.
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
The program probably uses the rename trick, which you can use in mIRC too:
Play some mp3 file foo.mp3 /rename foo.mp3 bar.mp3 /remove bar.mp3
If the rename works, the remove works. I couldn't do this in Win7, but I also couldn't rename it through explorer, which I remember being able to do in XP. IOW the bug may have been fixed.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
Yes, that trick worked under Vista. I added the -b switch and it was removed to the recycle bin while the song was still playing.
|
|
|
|
|