|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
why can't i write to an ini file when it's in use?
|
|
|
|
Joined: Dec 2002
Posts: 127
Vogon poet
|
Vogon poet
Joined: Dec 2002
Posts: 127 |
afaik you can't write to any file while it's in use.
------ deep down, i'm really superficial.
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
i can in text files for example
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
No you can't. Just because, for example, notepad has "file.txt" open doesn't mean file.txt "is in use". If the file is in use, you can't write to it.
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
i can, just checked that..
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
when a file is in use it cant be delete without the assistance of command prompt.
new username: tidy_trax
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
i can, just checked that.. If a file is being read/written to by a piece of software (say fopen for exaple in a program language) is cannot be modified or deleted.
-KingTomato
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
im talking about if the thing you are trying to delete is in processes/applications in task manager.
new username: tidy_trax
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
that may be tryue, but i have a text file (a.txt) and i then run a program (b.exe) that opens the text file and prepares it for writing, though the a.ttx isn't in the task manager it still cannot be deleted/modified.
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
I'm tired of you talking about things you know nothing about, therefore I'm going to prove to you and everyone that you have no idea what you are talking about. Download www.codemastr.com/lock.exe. Run the exe. It will create an empty file in C:\mirc called "testfile.txt". Now type /run notepad testfile.txt in mIRC... guess what happens? "The process can not access the file because it is being used by another process" So how about you stop making up your BS and when someone tells you something, don't comment on things you know nothing about. If you don't like the answers you are given (which are correct answers) then don't bother answering the question. Oh and if you want to see how simple it is to do this thinking maybe I did some "tricks" to make it cause that error, all I did was call the standard Windows CreateFile function.
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
/write file.txt text /run file.txt /write file.txt text2 there is no error and after u did it reopen the file and u will see text text2
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
The file isn't in use at the time though. mIRC does the same with log files that you have open. You open a log from an active channel and while the file is actually opening mIRC will display error messages in Status. Once Notepad or Wordpad has finished opening the file, mIRC can start recording again, and infact does. Wait a few minutes, close the log file, open it again and most of the recent events will have been added.
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
what do u mean by "in use" ? isn't when u open the file it's in use ?
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
Not as such. A file is in use only when being written to, read from, opened or closed but not if it's just sitting there doing nothing - as far as I know anyway.
|
|
|
|
Joined: May 2003
Posts: 730
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 730 |
|
|
|
|
|